parent
d4f42b3223
commit
b9f04bf5bb
|
@ -762,7 +762,7 @@ The HTML `base` tag with the `href` attribute specifies the base URI, or URL, fo
|
|||
"locales": {
|
||||
"fr": {
|
||||
"translation": "src/locale/messages.fr.xlf",
|
||||
"baseHref": ""
|
||||
"baseHref": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -806,11 +806,11 @@ server {
|
|||
server_name localhost;
|
||||
root /www/data;
|
||||
|
||||
# Fallback to default language if no preference defined by browser
|
||||
# Fallback to default language if no preference defined by browser
|
||||
if ($accept_language ~ "^$") {
|
||||
set $accept_language "fr";
|
||||
}
|
||||
|
||||
|
||||
# Redirect "/" to Angular app in browser's preferred language
|
||||
rewrite ^/$ /$accept_language permanent;
|
||||
|
||||
|
@ -834,17 +834,17 @@ The following is an example of an Apache configuration.
|
|||
RewriteEngine on
|
||||
RewriteBase /
|
||||
RewriteRule ^../index\.html$ - [L]
|
||||
|
||||
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule (..) $1/index.html [L]
|
||||
|
||||
|
||||
RewriteCond %{HTTP:Accept-Language} ^de [NC]
|
||||
RewriteRule ^$ /de/ [R]
|
||||
|
||||
|
||||
RewriteCond %{HTTP:Accept-Language} ^en [NC]
|
||||
RewriteRule ^$ /en/ [R]
|
||||
|
||||
|
||||
RewriteCond %{HTTP:Accept-Language} !^en [NC]
|
||||
RewriteCond %{HTTP:Accept-Language} !^de [NC]
|
||||
RewriteRule ^$ /fr/ [R]
|
||||
|
@ -979,3 +979,5 @@ Both elements now use the same translation (`Bonjour`) because they were defined
|
|||
<!-- ... -->
|
||||
<p>Bonjour</p>
|
||||
```
|
||||
|
||||
@reviewed 2020-04-10
|
Loading…
Reference in New Issue