Extjs 中的国际化无需导出项目?
我正在开发一个使用 ExtJS 3.2.1 进行 UI 设计的项目。我想同样实现国际化(i18n)。 (不导出项目) ?
我引用了以下链接:
http://www.sencha.com/learn/Tutorial:Localizing_Ext< /a>
http://extjstutorial.org/extjs/meertalig-i18n-met- extjs-en-codeigniter/
任何人都可以建议一些分步教程/电子书以供进一步参考吗?
谢谢!
I am developing a project using ExtJS 3.2.1 for UI design. I want to implement Internationalization (i18n) in the same. (without exporting the project) ?
I have referred the following links :
http://www.sencha.com/learn/Tutorial:Localizing_Ext
http://extjstutorial.org/extjs/meertalig-i18n-met-extjs-en-codeigniter/
Can any one suggest some step-by-step tutorail/ebook for further reference?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
除了本地化 Ext 的内置字符串之外,根据您的链接,我们还有一个返回本地化字符串的全局函数,并在我们想要显示字符串的任何地方调用它。我们还将用户当前选择的语言存储在变量和 cookie 中。
根据我们的经验,我建议您可能希望将服务器上的本地化字符串存储在数据库中,并通过加载时的 Ajax 调用将它们关闭。这允许您管理这些字符串,而无需部署代码更改。
当用户更改语言时,我们设置语言 cookie 并重新加载整个浏览器窗口。
In addition to localizing Ext's built-in strings, as per your link, we have a global function that returns a localized string, and call that everywhere we want to display a string. We also store the user's currently selected language in a variable and a cookie.
I would suggest from our experience that you probably want to store the localized strings on your server in a DB and bring them down via an Ajax call on load. This allows you to manage these strings without deploying code changes.
When the user changes the language, we set the language cookie and reload the whole browser window.