Hi
I need to convert the language based on language select in label i tried all codes but i didn't get any answer
It show the language name correctly but the path can be shown as null so the language cannot be change for the labels . For that we have do any thing This is my code
-(void)setHelloWorldLabel
{
NSLog(@"did call");
loginLabel.text=AMLocalizedString(@"Password",@"Pa ssword");
}
- (void)viewDidLoad
{
[super viewDidLoad];
LocalizationSetLanguage(@"Chinese");
[self setHelloWorldLabel];
}
Localizable.strings file
"Password" = "密码";
- (void) setLanguage

NSString*) l{
NSLog(@"preferredLang: %@", l);
NSString *path = [[ NSBundle mainBundle ] pathForResource:l ofType:@"lproj" ];
NSLog(@"path: %@", path);
if (path == nil)
{
NSLog(@"path if: %@", path);
//in case the language does not exists
[self resetLocalization];
}
else
{
NSLog(@"path else: %@", path);
bundle = [NSBundle bundleWithPath

ath];
}
}
- (NSString*) getLanguage{
NSArray* languages = [[NSUserDefaults standardUserDefaults] objectForKey:@"AppleLanguages"];
NSString *preferredLang = [languages objectAtIndex:0];
return preferredLang;
}
// Resets the localization system, so it uses the OS default language.
//
// example call:
// LocalizationReset;
- (void) resetLocalization
{
bundle = [NSBundle mainBundle];
}
Please anybody help me how to fix this