grails - Grails本地化,数字输入

标签 grails localization number-formatting

我在德国本地计算机上运行了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/

相关文章:

javascript - 如何在 React 组件中嵌入和调用外部 JavaScript 函数?

java - OS X : Terminal output of javac is garbled

cocoa - 在区域设置更改时进行禁用的格式化 NSTextField 更新?

ios - 使用 Swift 的双重格式

grails - Spring Security在Bootstrap期间返回空的SecurityContext

grails - Dose DB Reverse Engineering Plugin for Grails 支持辅助数据源吗?

html - 汉堡菜单图标 ☰ 未出现在日本 safari 中

sql - 如何在 PostgreSQL 中的点后显示 2 位数字?

java 从本地化的 NumberFormat 生成正则表达式

jquery - grails:无需页面刷新即可上传图片