Click here to Skip to main content
15,897,226 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
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.
C#
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. 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
Posted
Updated 4-Jul-14 1:17am
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900