I created several .strings files for my app's localization. Each one is corresponding to a locale. Now I want to get a list of all available locale in my app. Is there any function to help me do that??
E.g. if my app just supports English, Chinese, French the function can return [en, zh, fr]
swift:
var availableLanguages = NSBundle.mainBundle().localizations as [String]
objc:
NSArray *availableLanguages = [[NSBundle mainBundle] localizations];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With