1.8.x

Browser-based Language

Submitted by Nath, , Thread ID: 25996

Thread Closed
20-12-2016, 06:07 PM
#1
It sets forum language based on the HTTP_ACCEPT_LANGUAGE header sent by the browser if no language is chosen by the user. Coded for versions 1.8.x (may work in 1.6.x/1.4.x after some changes).

Troubleshooting:
Some stuff (login, 2FA, etc.) in ACP is not translated due to MyBB hook inaccessibility.
You need to install any translations you want to provide to users automatically. If a browser is set to French only and there's no French translation, MyBB will load the default forum language for the browser user.
As mentioned earlier, the browser needs to send a proper HTTP_ACCEPT_LANGUAGE header.
Language codenames in inc/language/[language_name].php's $langinfo['htmllang'] variable have to be compatible with http://www.metamodpro.com/browser-language-codes

Content locked
This content has been locked. Please login or register in order to unlock it.
Need me?Message me here!



Users browsing this thread: 1 Guest(s)