我在德国本地计算机上运行了Grails Web应用程序。
Grails如何确定使用的语言?从网络浏览器?从系统设置?通过更改用于ui的语言(例如,使用此语言:http://grails.org/plugin/lang-selector)是否可以更改?如果没有,它如何改变?
原因是(很少)我有用户通过(英语)终端服务器访问webapp。数字输入(逗号,点,...)有一些奇怪的行为
最佳答案
从http://grails.org/doc/latest/guide/i18n.html
By default the user locale is detected from the incoming Accept-Language header. However, you can provide users the capability to switch locales by simply passing a parameter called lang to Grails as a request parameter:
/book/list?lang=es
Grails will automatically switch the user's locale and store it in a cookie so subsequent requests will have the new header.
关于grails - Grails本地化,数字输入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11047757/