• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 2.0 Force a language to all users


Active member
I am building an addon that should bring the number of languages used back to one. Only the default language can be used.

The first step was to make template modifications. It is no longer possible to change the language in the preefrences-section, nor chose a language through the language-choser on the bottom left.

That works fine. :)

But now. People possibly have different language_id's set in the user-table. So for them, the forum will still be in that language. How can I force the forum to always use the default language?
1. I could run a query on all users to change the language_id (which they can't change back after that). But this would change data I think an addon shouldn't change.
2. I could set the language somewhere in the scripts... But where and how?
3. Possible other solution?