Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9001553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:27:07+00:00 2026-06-16T00:27:07+00:00

So in my app I am trying to get the devices currently set language

  • 0

So in my app I am trying to get the devices currently set language and its acronym. So I do this:

NSString *fullLanguage = [[NSLocale currentLocale] displayNameForKey:NSLocaleIdentifier value:[[NSLocale preferredLanguages] objectAtIndex:0]];
NSString *abrlanguage = [[NSLocale preferredLanguages] objectAtIndex:0];

However some users report that the language is returning something like: en_UK or something similar, which in turn is messing up the functionality of my app.

Anyway is there a way to get the currently set language of the device regardless if the devices regional settings?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:27:08+00:00Added an answer on June 16, 2026 at 12:27 am

    To get the language code, use:

    NSString *languageCode = [[NSLocale currentLocale] objectForKey:NSLocaleLanguageCode];
    NSLog(@"%@", languageCode);  // Prints "en"
    

    To get the full name of the language:

    NSString *languageName = [[NSLocale currentLocale] displayNameForKey:NSLocaleIdentifier value:languageCode];
    NSLog(@"%@", languageName);  // Prints "English"
    

    Note that you were using the region code (which provides for regional variations of languages), and could be gotten easier like this:

    NSString *regionCode = [[NSLocale currentLocale] objectForKey:NSLocaleIdentifier];
    NSLog(@"%@", regionCode);  // Prints "en_US"
    

    Region codes start with the language code, followed by the underscore, and then the regional variation. (This is standardized per Apple’s documentation.)

    Also, if you use currentLocale, know that it is not updated as the users preferences are changed. Use autoupdatingCurrentLocale instead if you want to keep it in sync if they change.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to get started with app development. Isnt this the corrent JDK if
I'm currently trying to set up an offline.manifest file for my web app to
In my Rails app I'm trying to get the MIME type of a file
Trying to get MGTwitterEngine app to build. Getting one pesky error. The following ERROR.
Trying to get my Universal app released and I rely on AdMob ads for
Im trying to get a slider on an iphone web app, I'm using iui
Im trying to get debugging working without an app.config. I have the following code:
I am trying to get my app automatically launched when the phone gets connected
I'm trying to get a barebone app engine app to handle incoming email. I've
I am trying to get an app of mine to communicate with a database

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.