How do I get a list of languages for which a Localizable.strings file exists?
I need to restrict a choice of languages to the ones that our app supports. How do I programmatically get a list of languages开发者_StackOverflow中文版 for which a Localizable.strings file exists?
As per this iOS documentation page you can can call the preferredLocalizations method to get the list of localizations in your bundle.
Open your project and look for the Localizable.strings
If it supports multiple languages, it will appear as a dropdown item:
There you have them all.
精彩评论