Redwarp
Redwarp

Reputation: 3231

List application available language

I'm trying to print the list of languages supported by my app.

Let me explain a bit more : I have an app in two language (let's say english and french), and I'm looking for a way to print "en, fr" programmatically, so that if I added a third language, such as dutch, my function would then print "en, fr, nl"

Upvotes: 0

Views: 69

Answers (1)

Ilanchezhian
Ilanchezhian

Reputation: 17478

You have to use NSBundle's localizations method

The code should be as follows:

NSArray *array = [[NSBundle mainBundle] localizations];
NSLog(@"Supported localizations : %@", array);

Upvotes: 1

Related Questions