MyBB Community Forums
[For 1.8] Browser-based Language - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Releases (https://community.mybb.com/forum-102.html)
+---- Thread: [For 1.8] Browser-based Language (/thread-187418.html)



Browser-based Language - Destroy666 - 2015-12-26

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

Bug reports/enhancement requests:
https://github.com/Destroy666x/MyBB-Browser-based_Language

Lang packs:
Since the current way of adding lang packs is not really good, PM me and I'll add you as contributor.

Download:
http://community.mybb.com/mods.php?action=view&pid=636