Phonegap/Cordova 国际化支持 [英] Phonegap/Cordova internationalization support
问题描述
我正在使用 Phonegap 开发移动应用程序,我需要国际化 - 以不同语言显示 html 页面.我现在明白这不是 Phonegap 问题 - 我必须将网络应用程序国际化.
I am developing a mobile application with Phonegap and I need internationalization - display a html page in different languages. I do understand now that this is not a Phonegap issue - I have to internationalize the web application.
- 是否有任何框架支持国际化(例如 jQuery Mobile)?
- 是否可以使用模板方法,例如在构建过程中使用属性文件和模板并生成 HTML?`
- 如果我使用 Bourbon 的方法(参见答案),我该如何根据选项设置切换语言?
亲切的问候,克里斯蒂安
Kind regards, Christian
--- 编辑 --
Phonegap 从 2.2.0 开始就有一个不错的全球化插件.它涵盖了很多 i18n 功能.检查文档 http://docs.phonegap.com/en/edge/cordova_globalization_globalization.md.html#Globalization
Phonegap has a nice Globalization plugin since 2.2.0. It covers a lot of the i18n functionality. Check the docs http://docs.phonegap.com/en/edge/cordova_globalization_globalization.md.html#Globalization
推荐答案
Phonegap 只是一个框架,能够在原生应用中显示网页,并使用一些插件与设备的硬件传感器连接.国际化的支持将取决于您的 html/js 设计.
Phonegap is just a framework to be able to show web pages in an native-app, and using some plugin to connect with device's hardware sensors. The support of internationalization will depend on your html/js design.
例如,您可以使用:
/html/en/index.html
/html/fr/index.html
...
并根据用户的语言调用好的页面.
And call the good page depending on the user's language.
希望这对你有帮助:-)
Hope this will help you :-)
这篇关于Phonegap/Cordova 国际化支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!