小智 5

是的,我们可以在应用程序中使用任何语言.您需要在应用程序内部选择语言,而不是设备的设置语言.定义本地化包中的所有关键字.

NSString *selected_lng_code = @"hi"

NSString *path = [[NSBundle mainBundle] pathForResource:selected_lng_code  ofType:@"lproj" ];
NSBundle *localizedBundle = [NSBundle bundleWithPath:path];

NSString *translated_word = [localizedBundle localizedStringForKey:@"Hello" value:@"" table:nil];
Run Code Online (Sandbox Code Playgroud)