View Single Post
Old 07-04-2019, 11:09 AM  
natstutor
Registered User
 
Industry Role:
Join Date: Jul 2013
Posts: 12
do you really need to use subdomain/subfolder?

i think in PHP, most browser sends HTTP_ACCEPT_LANGUAGE to indicate what locale the surfer is in

$locale = Locale::acceptFromHttp($_SERVER['HTTP_ACCEPT_LANGUAGE']);
echo $locale; // returns "en_US"

then just use that to detect the correct language pack to use.

a common practice is to have a dropdown in the menu, so that users can choose what language to view the contents (and store that in cookie for their future visit)
natstutor is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote