Cordova iOS应用程序本地化/全球化 [英] Cordova iOS Application Localization/Globalization
问题描述
嗨
我正在使用Cordova 3.0开发自定义相机应用。
我使用UIlabel和UIImageoverlay覆盖文本以覆盖文本和图像到设备相机。
Hi
I am developing a custom camera app using Cordova 3.0.
I am overlaying text using UIlabel and UIImageoverlay to overlay an text and image on to the device camera.
UIImageView *myView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:]];
myView.alpha = 1.0f;
NSString *deviceType = [UIDevice currentDevice].model;
if([deviceType isEqualToString:@"iPhone"])
{
myView.frame = CGRectMake(0, 0, 320, 450);
}
else
{
myView.frame = CGRectMake(0, 0, 768, 1004);
}
cameraPicker.myView=myView;
pickerController.myView=myView;
UILabel *myLabel = [[UILabel alloc] initWithFrame:myView.frame ];
myLabel.text = @"Some text";
[myLabel setTextAlignment:NSTextAlignmentCenter];
[myLabel setTextColor:[UIColor whiteColor]];
.
.
.
.
.
.
if([deviceType isEqualToString:@"iPhone"])
{
myView.frame = CGRectMake(0, 0, 320, 450);
myLabel.center = CGPointMake(myView.frame.size.width/2,myView.frame.size.height/2);
}
else
{
myView.frame = CGRectMake(0, 0, 768, 1004);
myLabel.center = CGPointMake(myView.frame.size.width/2,myView.frame.size.height/2);
}
1.当字符串在服务器或JavaScript或xml中时,如何将i18n,l10n应用于UILabel 。
2.当我使用Cordova编写应用程序时,它确实给了我设备Lang(默认)但是如何在html中单击按钮时覆盖它并显示它们而不更改设备默认语言。
3.如何使用cordova实现上述目标。
提前致谢
Ravikiran
1. how to apply i18n, l10n to the UILabel when the Strings are in server or JavaScript or in xml.
2.when i wrote the App using Cordova it does give me device Lang(default)but how to override it on a button click in html.and display them without changing the Device default language.
3.how to implement the above using cordova.
Thanks in advance
Ravikiran
推荐答案
这篇关于Cordova iOS应用程序本地化/全球化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!