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

  • Home
  • SEARCH
  • 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 9046547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T11:41:00+00:00 2026-06-16T11:41:00+00:00

I am localizing my iOS app, and in the Simulator it runs correctly in

  • 0

I am localizing my iOS app, and in the Simulator it runs correctly in my chosen language every time.

When testing on my iPhone 5, it only detects the language properly the first time the app runs. Every other time I recompile and run my app on the device, it detects “en” as the language, even though I am testing with Español (“es”) selected.

I detect the language using:

[[[NSBundle mainBundle] preferredLocalizations] objectAtIndex:0]

I’ve also used:

[[NSLocale preferredLanguages] objectAtIndex:0]

Same result.

If I kill the app after the first run, and restart it on the device, it continues to detect the language properly.

But if I kill the app and then recompile/restart via Xcode after the initial run, it will load with “en” (English) detected instead.

After that, killing and re-starting the app continuously detects as English unless I delete the app completely, and recompile/reinstall/run the app via Xcode. The cycle then repeats… subsequent rebuild/restart without first deleting the app from the device results in misdetection.

All other apps on my device display with Spanish language the entire time. The entire UI shows in Spanish.

UPDATE: I’ve now tested on my iPad (3rd gen) also running iOS 6, and am experiencing the same behavior.

UPDATE 2:

In didFinishLaunchingWithOptions, I have this code to detect language: (language is an NSString*):

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

Followed by this debugging statement, to compare the value I’m getting, as well as a slightly different way of detecting it, just for debugging:

NSLog(@"Detected language: %@ / %@", language, [[[NSBundle mainBundle] preferredLocalizations] objectAtIndex:0]);

The output shows as “Detected language: es / es” when the app works properly in Spanish mode, and then shows as “Detected language: en / en” when it doesn’t. Still no idea why it decides to load as English sometimes…

UPDATE 4: I appreciate everybody’s answers, and I’ve tried the various suggestions. Unfortunately I was unable to award the +100 bounty as none of the suggestions seemed to fix the issue. If someone does ultimate find a solution that works for me, I will award another +50 bounty to them at that time.

UPDATE 5: I have updated from Xcode 4.5 to 4.5.2, and experiencing this same issue.

UPDATE 6: I have now created a new test project from scratch, and it works perfectly fine! Obviously something must be wrong in the way my project is laid out, or perhaps in one of the data files. I guess my next journey will be to re-create the project from scratch, copying file data over one by one…

UPDATE 7 (MONTHS LATER): Sadly, I am again facing this issue after temporarily resolving it (seemingly) by painstakingly recreating my project. On first load, the language is correctly rendered, but on subsequent loads, it reverts back to English.

SOLVED See my final solution below. Thanks for the help everyone. I may dole out some of the bounty since it will go to waste anyway.

  • 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-16T11:41:01+00:00Added an answer on June 16, 2026 at 11:41 am

    I have FINALLY solved this problem after many months! Thanks to all for the help (I also had some good back and forth with an Apple developer via the dev channels).

    TL;DR: I was accidentally syncing language preferences (among many other unexpected things) between devices, using my app’s iCloud key value store (via MKiCloudSync)! Read on…

    I am using a third-party class called MKiCloudSync, which helps with syncing [NSUserDefaults standardUserDefaults] to my app’s iCloud key value store. My intention when I began using it was to let it handle some user favorites syncing in the background.

    However, not understanding how standardUserDefaults works, what I didn’t realize is that there are a lot of other things being written into standardUserDefaults other than just my own custom app settings!

    So what was happening was this:

    1. Start the app up for the first time. Fresh standardUserDefaults in place, and the internal “AppleLanguages” key that stores the ordered list of language preferences is correct based on the current device choices.

    2. App displays properly in the designated language.

    3. In the background, MKiCloudSync syncs ALL standardUserDefaults to iCloud. Conversely, if you had run this app elsewhere, say with an English set device, that device would have also synced it’s language settings up to iCloud. So now this current running app is actually having it’s language preferences overwritten.

    4. BOOM … next time the app is run, no matter what you have selected on the device, it’s whatever was pulled down from iCloud that will be used as the default language!

    What I plan to do to solve the issue with my next app update:

    1. Use a forked version of MKiCloudSync that allows for syncing only whitelisted key names.

    2. Add code that will do a one-time cleanup, first cleaning out the iCloud keystore for my app, then (based on this SO answer), calling this code to reset the user defaults:

      NSString *appDomain = [[NSBundle mainBundle] bundleIdentifier];
      [[NSUserDefaults standardUserDefaults] removePersistentDomainForName:appDomain];

    In my testing so far, this sort of solves the issue… unfortunately, the user would have to restart the app for the language fix to kick in. However, my guess is most users are not experiencing this issue, as they are unlikely to be using multiple devices with different default languages.

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

Sidebar

Related Questions

I'm localizing an iPhone app for the first time. I've put all my strings
I'm localizing my iPad/iPhone app by using genstrings Classes/*.m to generate the Localizable.strings file.
Heey, I can localize my iPhone app with the systems local by localizing the
Im having some issues localizing a danish app ive made. (The language, not the
I'm localizing my app and one of the language/region supported is Espanol-419. Android doesn't
I'm working on an iPhone app that we're localizing in both English and Japanese
I'm localizing a WPF app using the LocBaml method. Everything works great for UI
I have followed Apple's documentation on localizing iPhone software, using the genstrings ruby script
What options are there for localizing an app on Google App Engine? How do
When I started localizing a website the first time, I just did the localization

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.