Wiki source code of Language Parameters

Last modified by Eleni Cojocariu on 2026/09/15 17:02

Show last authors
1 The two ##xwiki.language## parameters are shipped commented out in the "Internationalization" section of ##xwiki/WEB-INF/xwiki.cfg##, where ##1## means true and ##0## means false. Both are read at startup, so a change takes effect only on the next restart.
2
3 |=Parameter|=Where|=Default|=What it does
4 |##xwiki.language.preferDefault##|##xwiki/WEB-INF/xwiki.cfg##|##0##|When set to ##1##, makes the wiki's default language win over the language the browser asks for, for a reader who has not chosen one.
5 |##preferDefaultLanguage##|##WebPreferences## xobject of a space, or ##XWikiPreferences## of the wiki|unset|The same setting, scoped to one space instead of the whole instance.
6 |##xwiki.language.forceSupported##|##xwiki/WEB-INF/xwiki.cfg##|##1##|Restricts every step of the [[language resolution>>doc:documentation.xs.admin.language.resolution.WebHome]] to the wiki's supported languages.
7
8 This is how the two of them appear in the shipped file:
9
10 {{code language="none"}}
11 #-# By default, XWiki chooses the language specified by the client (browser) in the Accept-Language HTTP header. This
12 #-# allows to use the default language of the wiki when the user didn't manually choose a language.
13 # xwiki.language.preferDefault=0
14
15 #-# Force only one of the supported languages to be accepted. Default to true.
16 # xwiki.language.forceSupported=1
17 {{/code}}

Get Connected