使用jQuery进行本地化 [英] Localization Using jQuery
问题描述
我正在开发聊天应用程序,并且我希望根据该国家/地区的特定语言对应用程序进行本地化. jQuery是否支持此功能,还是我需要使用其他内容进行本地化?
I'm developing a chat application, and I want to have the application localized according to the particular language in that country. Does jQuery support this, or do I need to use something else for localization?
推荐答案
我也有这个本地化问题要解决.我是在没有JQuery的情况下做到这一点的(就像Arnis所说的Jquery不能解决任何问题).
Well I had this localization problem to solve too. I did it without JQuery (like Arnis said Jquery doesn't solve anything).
我创建了XML文件,这些文件保存了我的数据的lang字典.我将这些lang文件保存在内存中,并根据设置的语言,使用XPath函数获取数据.
I created XML files that hold the lang dictionary for my data. I keep these lang files in the memory and based on whichever language is set, I fetch the data using XPath functions.
它快速,高效,合乎逻辑并且运行良好.
It's fast, efficient, logical and works well.
这篇关于使用jQuery进行本地化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!