Reputation: 769
I developed an app, that contains a few input plist files, with input data for this app. This input data now is in russian language.
During developing process I intended to distribute this app only at Russian AppStore for russian speaking customers. Now my app is in AppStore. But now I also want to distribute my app for english speaking customers. I know that I have to prepare translated input plists with input data in english language.
My question concerns more localizations in the app..
During development I changed info.plist file, I set "Localization native development region" to "ru".
What is the most correct way to solve my case? Should I leave "Localization native development region" set to "ru" and add English localization? Or should I set "Localization native development region" back to "en" and add Russian localization? Or maybe I should add two localizations - english and russian? In this case, what option should I set to "Localization native development region"?
And by the way, how can I choose programmatically which one input data plist file read depending of current localization?
Upvotes: 0
Views: 1149
Reputation: 5066
I think you should change the Localization native development region to en region, from the documentation:
CFBundleDevelopmentRegion (String - iOS, OS X) specifies the default language and region for the bundle, as a language ID. For example, English for the United Kingdom has the language ID en-UK. The system uses this value if it cannot locate a resource for the user’s preferred language
Count of English speakers more on the world then count of Russian speakers. If the location system can't finds needed localizations it will use your native language file. But if you use a method of NSBundle to load native resources (for example a plist):
- (NSURL *)URLForResource:(NSString *)name
withExtension:(NSString *)extension
subdirectory:(NSString *)subpath
localization:(NSString *)localizationName
//The file URL for the resource file or nil if the file could not be located.
You should add non a localized plist file, to avoid returning nil URL from this method for unsupported localization (a file with same name but not in a lang directory).
Here you can read how NSBundle finds resources if you request those.
Upvotes: 2