enter image description hereIn iOS, can we change App localization in hindi? I tried following examples but its only support info.plist values https://code.tutsplus.com/tutorials/ios-sdk-localization-with-nslocalizedstring--mobile-11603
Asked
Active
Viewed 560 times
2
-
What's your exact problem? why you don't want to go with info.plist? Please mention all the details about your problem and if there is any problem while using info.plist, mention it as well. – Ashil Shah Feb 23 '17 at 12:12
2 Answers
5
Yes, we can have any language in app. You need to have language selection inside the app instead of device's setting language. Define all keywords in localization bundle.
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];

Jaap
- 81,064
- 34
- 182
- 193

Parikshit Hedau
- 71
- 2
0
You have to create on InfoPlist.strings
file for localizing Info.plist
value. To do so, go to File -> New -> File, choose Strings File under Resource tab of iOS, name it InfoPlist
, and create it. Now open that file and add Info.plist
values you want to localize like:
"CFBundleDisplayName" = "<app name>"
. This will be your Base file.
For your desired language, select your localized files and add translated strings.

Pratik Patel
- 1,393
- 12
- 18