Language Parameters

Last modified by Eleni Cojocariu on 2026/09/08 22:24

Reference

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.

ParameterWhereDefaultWhat it does
xwiki.language.preferDefaultxwiki/WEB-INF/xwiki.cfg0When 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.
preferDefaultLanguageWebPreferences xobject of a space, or XWikiPreferences of the wikiunsetThe same setting, scoped to one space instead of the whole instance.
xwiki.language.forceSupportedxwiki/WEB-INF/xwiki.cfg1Restricts every step of the language resolution to the wiki's supported languages.

This is how the two of them appear in the shipped file:

#-# By default, XWiki chooses the language specified by the client (browser) in the Accept-Language HTTP header. This
#-# allows to use the default language of the wiki when the user didn't manually choose a language.
# xwiki.language.preferDefault=0

#-# Force only one of the supported languages to be accepted. Default to true.
# xwiki.language.forceSupported=1

FAQ

Do these parameters affect the translations of a page?

No. They decide which language a reader sees, while the translations a page has are a page-level setting.

Related

Get Connected