是否有一种标准化的方法来创建多种语言的 jQuery 移动应用程序(使用 Phonegap)?
Here is the link that you can use for using multiple languages in your app. I don't have a working example right now but I think it will work fine in case of jQuery mobile without problem.
For Android try this: https://github.com/phonegap/phonegap-plugins/tree/master/Android/Globalization
For iPhone try this: https://github.com/phonegap/phonegap-plugins/tree/master/iPhone/Globalization
i have written a HTMLed framework specifically for jquery mobile check out this >> link << on github
Hope this helps out to solve the problem.
In case someone has the same question... I found the microsoft solution from "lakhlaniprashant.blogspot.com" not very helpful. But thanks anyways ;-)
I wrote my own localization function with javascript and json.
in my case my webapp is developed with jquerymobile and php, so i have 1 php file for every lang i want to support.
example:
if the user has configured his language as english i include on my header the English.php if the user uses spanish i include the spanish.php:
english.php:
<?php
$sentence="this is a sentence";
?>
spanish.php
<?php
$sentence="esto es una frase";
?>
if you "echo $sentence" it will take the one from the file you included. I store the selected language in a cookie and include the proper language file.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.