Code: Select all
if ($change_lang || $user_lang != $config['default_lang'])
Code: Select all
if( !$change_lang ) $change_lang= substr( $_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2 );
Actually there is a MOD for automatic browser language detection, it has been around for quite some time. Whether it is the best solution depends on what language packs you are using on your board. It works quite well for unique languages but when you start using multiple localized versions of the same base language things get a bit hairy.AmigoJack wrote:I understand what you want and there is no MOD for this available
The MOD I linked to will actually allow a guest registering to choose to view the registration page (terms & conditions) or any visible page in any language available on the board via a drop-down menu in the overall header. It's not automatic detection and requires a single mouse action on the part of the visitor but it does take any potential browser language detection errors out of the mix. It removes the extra steps of having to select Agree to the default language TOS, proceed to the registration form, select the appropriate language from the board languages available and then be redirected back to the TOS in the chosen language and then again back to the registration form. Both MOD's should work for you, which one will work best will depend on what languages you have available on your board.AmigoJack wrote:(the one suggested above won't help - such a combobox is already available to the registration process if you have more than one language pack installed).
In 3.0.7-PL1 you have the combobox on the first (TOS) page aswell.narqelion wrote:It removes the extra steps of having to select Agree to the default language TOS, proceed to the registration form, select the appropriate language from the board languages available and then be redirected back to the TOS in the chosen language and then again back to the registration form.