Home  >  Article  >  Backend Development  >  php页面判断用户发生页面语言

php页面判断用户发生页面语言

WBOY
WBOYOriginal
2016-06-13 13:00:46955browse

php页面判断用户产生页面语言
我现在使用opencart设计网页,使用两种语言,简体,繁体,货币RMB,HKD
遇到一个难题:
如何根据用户来判断使用哪一种语言,并且只显示一种语言,另一中隐藏?
并且根据使用语言的情况来判断使用货币,RMB,HKD?
通过用户提交的lang,来判断zh,或zh-hk.
但是这里的lang是如何工作的?
也许我表达的不购清晰。但有高人愿意告诉我改如何设计?


------解决方案--------------------
可以先获取 $_SERVER['HTTP_ACCEPT_LANGUAGE'] 进行判断后再次跳转到指令的语言页面处理

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn