From now I will distribute all my mods as attachments to topics in this board.
Feel free to consider them eternal betas.
Another simple mod that recognize the default language set in the browser, check if this language exists in your SMF installation and if the user is a guest and doesn't have already another language set (in session) load this as default language.
Nothing to set, nothing to translate, nothing to edit.
Compatibility: SMF 2.0.x
https://github.com/emanuele45/Browser-Language-Detection-and-Loading
Removed because broken
Questa mod è stata ben poco considerata ma direi che almeno per il mio forum è ottima, mi serviva proprio :D la scritta in italiano perchè so che lo sei pure tu ^^ e grazie per la mod!
This mod has not been considered very much but at least for my forum is awesome, i really needed it :D thanks!
Thanks man!
Thanks.
Well, it's just a small mod done basically for fun... :P
Glad it can be of any help! ;D
I'll say that in English so if anyone experiences the same problem he would be able to understand what's wrong...
I randomly get the error in the attachments spamming my error log...
I'll attach the guilty file as well.
Please help T.T
[EDIT]Almost forgot. It's not actually a random guest who has produced the error, it was me :o and i was logged in O.o
Out of curiosity, what browser are you using?
Honestly I'm not that familiar with HTTP_ACCEPT_LANGUAGE, so I can just guess it is not always set.
So, the easiest fix is to change line 94 from:
$browser_langs = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
to:
$browser_langs = !empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']) : array();
I'm using Maxthon, a light and fast browser using stuff from both Firefox and based on Chrome, with more functions and less annoying than that xD
If you want to give it a try you can find it here, i just love it: Maxthon website (http://it.maxthon.com/) the link is for the Italian language as you are Italian as well :P for anyone else you can change its language in that very same page with a button in the lower part of the page. It will be featuring also a pay-to-use thing so the more you use it and the best gifts you will receive, somehow like Blurum if you know.
Anyway thanks a lot for the fix i'll try it and see if that works :D (it should for the little coding i know it should, i'll ask again if it doesn't ;) )