-
Notifications
You must be signed in to change notification settings - Fork 0
LanguageComponent
The LanguageComponent is used for detecting the client's language.
| Sitemap Compatible | Application Compatible | Parameters |
|---|---|---|
| true | true | defaultLanguage, acceptedLanguages, languageParameterName, forceRedirect |
[Optional]
By default defaultLanguage is set to 'en', for English. This is the default language to be used.
[Optional]
By default acceptedLanguages is set to null, which means all languages are accepted. Alternatively you can specify a comma separated list of languages that are accepted. If none of the accepted languages was detected, it will use the defaultLanguage.
[Optional]
By default languageParameterName is set to "language", meaning that in the template the variable $language contains the detected language.
[Optional]
By default forceRedirect is set to false, meaning that the language will be detected, but no action is taken. If set to true, a redirect will take place to the correct language prefix. For example a French person requesting /, will be redirected to /fr/ and a Enlish person requesting /fr/something will be redirected to /en/something.
| Title | URL | Regex | Component | Template | Parameters |
|---|---|---|---|---|---|
| Lang | /^/(.*)/ | true | LanguageComponent | base | defaultLanguage: "nl" |
| acceptedLanguages: "nl,en,fr" | |||||
| forceRedirect: "true" |
None