IPhone sdk: Internationalization doesnt works - iphone

Recently I have made intenationalization support for my project.
But there occurs strange thing - when I'm running my application both on the device and emulator shows only 'default' language.
I've done following things:
Used NSLocalizedString everywhere
added InfoPlist.strings (another language)
May be I'm missing something ?
Thanks.

You should store your localized strings in Localizable.strings. Localized InfoPlist.strings is used to change the name of your app for example.

Related

iOS App doesn't work in other language

My iOS-App was first German and English. As it was just a fault, I removed the English localization. Somehow if I change the language in the iOS Simulator to english not it loads the old storyboard that doesn't even exist anymore. I cleaned the folder and there is now only a base storyboard. Although I cleaned the Project the App is still crashing after start (because it's loading an old storyboard of prior App version (I removed english localization in 1.1, and now in 1.2 it still loads the 1.0 storyboard).
This is really weird, how can I achieve that the App ALWAYS uses the same storyboard, no matter which language? I already removed the english localization!
Thanks very much!
From my understanding based on a previous experience, if you are localizing an application you need to keep the English one. Because it will default to English if the device is not set in the language that you are supporting.
(Have you notice in the setting app how english is always the second choice and that you can't change the order like on the desktop to default to something else before english)
So if you are planning on supporting only 1 language remove all localization into your application. Because other wise it would default to a non-existing asset and crash.
That would be my best guest for a try.
Have you delete the application on your device after all those change and a clean up may be necessary. I've notice that file, (especially not code file) that get deleted have a tendency to lay around the executable.
And if you get file (1) b.xml and (2) fr.lproj/b.xml even if the device if in french the french one (2) won't get used. The system will see (1) first and think there is no localization for that file.
As for "losing" your German Xib. If you take a copy out of your de.lproj (and put that copy up a directory in the file system it should work)

iPhone - Wrong Localization after Changing the Language

I am developing an application that supports English and Arabic localization. If the iPhone language is set to Arabic, everything is fine. If I changed the language to English, the app continues to change in Arabic.
I tried the following:
Terminating the application before changing the language.
Removing the application from iPhone. Changed Language to English. Restarting the iPhone. And building the application from scratch (still in Arabic!).
I tried cleaning using shift-command-k (also failed).
I removed the application. restarted the phone. Cleaned the build folder (shift-option-command-k). Then I built the application, and guess what, it's still in Arabic! (How, in God's name, did the iPhone know that I used Arabic before?! I restarted the phone many times!, removed and clean the build directory!).
So, what do you think I should do?
Note: other apps that provide localization are working fine.
Does the project have en.lproj Localizable.strings file?
Thanks #Shatou Dev ,I make my comment as an answer.

Experiencing An Issue With Localizable.strings in an iOS iPad App

This is the first time that I have attempted to add some localization into an app using Localizable.strings files and I am experiencing an unexpected issue with it. For clarity, these are the steps I have gone through.
File >> New >> New File and added a Resources file of Strings type.
Named the file 'Localizable.strings'
Clicked into the Localizable.strings file and added Spanish through the Localization section. (I have confirmed in my project folder that I have the en and es folders).
Started to add my KEYS in the Localizable.strings (English) file and then add the Spanish translation into the Spanish file.
As an example, this is one of the localizations I am trying to add.
"CAMERA_ERROR" = "The device does not have a camera";
I am added the exact same string in the Spanish .strings file, but changing the text to suit Spanish. Within my app code I am using the following:
NSString *cameraError = NSLocalizedString(#"CAMERA_ERROR", nil);
Everything seems fine up until this point, but this is where it gets weird and I get confused. If I run the app on one of my iMacs it works fine and depending on what language I set the simulator to it displays the correct English or Spanish string.
However, when I run the exact same app on this MacBook Pro it doesn't display the string, it instead takes the "KEY" title and displays that. So instead of showing the message as "The device does not have a camera" it shows it as "CAMERA_ERROR". The code is exactly the same as it is the same project cloned from a git repo.
Can anyone shed any light on this? Any setting on the MacBook that could be different?
Try doing the following on your MacBook Pro:
clean the project;
remove the app from the simulator/device;
rebuild the app.
This should fix it.

iPhone language setting and localization to Norsk (bokmal)

i have a real weird thing going on. I am trying to get the language settings in my
*strings file for "Norwegian Bokmal - Norway"
to display. But It will not work and always takes the default.
I set the
iPhone language to Norsk (bokmal)
and have the file setup correctly.
This app has already 8 language *string files and Norwegian is the 9th.
Did anybody experience something similar?
I tried 2 different iPhones (both iOS5) and the simulator (iOS4.3) - there is no way my app recognizes the Norwegian strings file - it always shows up with the default language.
Thanks very much!
Did you use the correct language code in your folder structure? I believe it should be "nb".

iphone three20 based app show unexpected localized text when running on device

I have set the following setting in my app's -info.plist file, but still when running on the real device, I am seeing the localized string instead of english. The app is based on three20, what could be wrong? Thanks in advance!
<key>CFBundleLocalizations</key>
<string>en-US</string>
<key>CFBundleDevelopmentRegion</key>
<string>en_US</string>
Please note that I don't see the problem on emulator. And also, my iPhone device has no other language set of international but just English, neither do I have a different keyboard setting.
I don't think it's directly related to three20.
I had a few cases that I had to change the product name temporarily to cause xcode to refresh the localized assets. You can try that. Search for the product name in the project's build settings.