samedi 29 octobre 2016

Laravel get user language based on user country

i trying to set the user default language based on user's country

i tried to use this command

Request::server('HTTP_ACCEPT_LANGUAGE');

but it give me this result:

en-US,en;q=0.8,he;q=0.6,zh-CN;q=0.4,zh;q=0.2,ru;q=0.2

so i realized that this is not the right way to detect the user default language because it based on the browser usage and i think that my users will prefer to use their country language

so i wonder what is the best way to get the user language based on his country?

thank you!



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2eSR274
via IFTTT

Aucun commentaire:

Enregistrer un commentaire