iPhone – Get the iPhone Preferred Language Codes

Unlike Android, iPhone allows users setting their preferred language code in iPhone. If you want to get the preferred language, the following piece of codes should help.

NSString *language = [[NSLocale preferredLanguages] objectAtIndex:0];


As you can see, the preferred language codes are stored in an array. So you could get the second preferred language with index equals to 1.

Here is the list of some preferred language codes.

ar      Arabic
cs      čeština
da      Dansk
de      Deutsch
el      Ελληνικά
en      English
es      Español
fi      Suomi
fr      français
he      עברית  
hr      Hrvatski
id      Bahasa Indonesia
it      Italiano
ja      日本語
ko      한국
nb      Norsk (Bokmål)
nl      Nederlands
pl      Polski
pt      Português
pt-PT   Português (Portugal)
ro      Română
ru      Русский<
sk      slovenčina
sv      Svenska
th      ภาษาไทย
tr      Türkçe
uk      українець
zh-Hans 简体中文
zh-Hant 繁體中文


Done =)



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.