开发者

PHP Language System with no user registration

开发者 https://www.devze.com 2022-12-15 03:35 出处:网络
i want to make my site a开发者_如何学Govailable in several languages, but im not going to use user registration so how can i make a language system?

i want to make my site a开发者_如何学Govailable in several languages, but im not going to use user registration so how can i make a language system?

searched for a cookie language system tutorial but didnt found anything

if you have any other suggestion please share, and i cant use modrewrite


You can find it in the request header if their browser/operating system tells you about their locale or you can geolocate the ip address. You should make it possible to manually select a locale for the user, because not everyone makes their locale available with their browser.


Sessions and user registration aren't the same thing - you can detect the user language and store it in a session variable without asking the user to register.


$_SERVER['HTTP_ACCEPT_LANGUAGE']

You could use a php include like this: http://techpatterns.com/downloads/scripts/php_language_detection.txt or check out the neat qTranslate WordPress plugin for ideas: http://www.qianqin.de/qtranslate/

0

精彩评论

暂无评论...
验证码 换一张
取 消