Problems in changing language of my iPhone app - ios

Hi I've created my iPhone app for IOS 5.0 with Xcode 4.2. By default it is localized in English.
I would like to make the app appear on the app store with language "French".
From my understanding, I've to remove English language and add the French one, but this is causing some problems to me.
At first, each time I open my app in Xcode, english language is added by default, even if I have removed it previously.
Moreover, if I localize my Storyboard files in French, the file is moved to my fr folder in project, but this causes in "Copy Bundle Resources" a problem with the file that becomes red.
To make it work again, I've to remove the localization from the Storyboard files.
Can you please help me?

Related

Xcode Display Name and Danish Characters causes Xcode to fail

I'm developing an app with Swift + Spritekit with the project name as simple as "learningApp".
A good step and several hours into the development my team decided to name the app (with danish letters) "Lær Toner" (which in English means to learn tones).
However, when doing so - the entire project fails in Xcode. The .swift and .sks scene-files are not able to communicate and the console outputs this message:
2019-10-31 00:09:47.549357+0100 Lær Toner[18206:292858] Unable to load custom class 'LaunchScreen' from module '(null)'
Just to be clear, here's images:
So if I change the name to "Learn Tones" there are no issues at all and the app works as intended. As soon as I change it back to "Lær Toner" and run the app the console outputs the message above.
I tried to change it via "Build Settings" also - I also tried to reboot Xcode, clean the build folder, but nothing have helped so far.
I can see in the Danish App store that multiple applications have Danish letters like Æ, Ø and Å in the name, so that leads to think it's (hopefully) a minor thing I've missed.
I've searched the world wide web till the end, but I have not found anything close to a solution to this issue.
If anyone has any input, or knows how to deal with this, I'd be a happy developer.
Thanks in advance.
I found the same issue when i have changed the display name from the 'General' tab of my target settings.
The solution is;
Go back to the previous name by discarding the changes you have made, and make sure the app is running correctly.
Uninstall the app from your device or simulator.
Clean the project.
The important thing is to add a new key on your info.plist
<key>CFBundleDisplayName</key>
<string>Lær Toner</string>
And it will be ok.

Localisation issues with localisation strings

Just spend another evening, trying to figure that out.
Here is what I am doing:
1) Creating a clean project with tabbed iOS application in XCode 6.3.1;
2) Under Project/Info/Localisations I am adding another localisation (Russian,German, doesn't matter)
3) In Main.strings file, changing corresponding strings, OR doing exactly the same by Exporting/Importing .xliff file.
4) Deleting app from simulator/device, cleaning project from Product/Clean, deleting derived app data from corresponding folder
5) Changing language in simulator/device
6) Making a run... Still English. Localised strings just wont pick up, no matter what.(even though they are looks just fine trough assistant editor)
What am I doing wrong? Is that suppose to be that complicated?
Try running on a device. Xcode 6.x had known issues with the Simulator not showing localizations.
Just got update from 6.3.1 to 7.0.1 XCode and the issue is fixed for me.
I am making exactly same steps and got Russian/German/English interface depending on the language I chose in simulator settings.
Guess that is it.

Xcode 6 - Localization does not work correctly, always english

I want to add some languages to my application. At the beginning, I started just in german. So after I finished the application, I wanted to add english to it.
So I opened up the project file, and saw that my applications "Development Language" is english. So I added german there and added german in my Localizable.strings file and started to change the english file.
After I was finished, I saw that in my info.plist the key Localization native development region was set to "en". So I changed it to "de". Unfortunately, the "Development Language" was still "english". So I opened up the .xcodeproj file with a text editor and changed the "Development Language" to german. Now my "Development Language" is set correctly to german.
"Use Base Localization" was checked by default.
But now I have the problem, when I run my application with a german device, the whole app is in english and not german. When I run the app with an english device, it's in english,too.
Can someone help me?
Thanks!
Ok, it seems like it's a Xcode/iOS simulator bug... It works when I follow the instructions on the top of this question.

Xcode doesn't allow to add internacionalization

I have a project in XCode 5 (Target iOS 7.0). I removed "Base Localization" and my Main.Storyboard. Then, i restores my Main.Storyboard, but XCode doesn´t allow me to add any localization. Do someone know this problem?
I tried the checkbox "Use Base Internacionalization", the "+" button. When I tried to add, there is no "resource file" and "Reference Language". When I press finish, nothing happens.
Im my experience, Base internationalization just confuses the issue of localization. My localized apps don't use it. Just create a Localizable.strings file (SmoothLocalize has a good tutorial HERE) in English, then follow the tutorial for adding further languages. English will be the default.

Xcode 5/iOS 7 - localization not working in simulator

I was following one of Ray Wenderlich's tutorials on localization but I can't seem to get it working.
I've set my project up for localization in English and French and I have a locaziable.strings file for each:
The French file has the correct (well as far as Google translate goes) French versions of my string:
I'm setting the strings by calling the correct key from the localizable.strings file:
NSString* strTitle = [NSString stringWithFormat:NSLocalizedString(#"Title", Nil)];
And I have the simulator set to French (BTW: Whenever I do a language change the simulator crashes).
But it is not pulling from the correct localizable.strings file. It's still displaying in English:
Am I doing something wrong?
If you are using xcode 6.1.1 and iOS sdk 8.1,try this workaround.
It seems localization does not work with xCode 6.1 and 8.1 simulator.
Workaround:
Go to "edit schemes" >> "Run" (side bar) >> "Options" tab >> "Application Language"
Select the language you wish to run the app on the simulator.
I got this workaround from Workaround by natanavra
Thanks to him.
However I read on developer forum,that it is working in 6.2 beta version of Xcode. Hope it do.
Maybe you have run the app at some time where the file Localizable.strings already existed but has not been localized yet. If this is the case, this unlocalized file still resides in the resources folder in the application bundle in the simulator (when you build an run a new version of your app in the simulator or in the device, unused files will not be deleted). This can lead to problems.
Try to delete the app completely from the simulator and build an run again.
I have experienced similar issues (IB localization in my case) on device. So general answer would be
Device - Uninstall app and clean project by Shift+CMD+K
Simulator - Go iOS simulator > Reset Content and Settings and clean project by Shift+CMD+K
These problems are really annoying. Along with poor ability to update localized strings is localization one of the biggest drawback of iOS development.
Another problem that could cause localization not work is the encoding of the strings file. Localizable.strings's encoding must be UTF-16. The default encoding of text file in xcode is UTF-8, that cause me spending a whole day to check why the localization not work.
In Xcode 6.0 and later, Localization not work by changing language in Simulator not working.
You have to edit scheme before running your application.
Go to Edit Scheme -> Run -> Options, change language here.
Now, Run Your Application. It will Work.
For more details, check this answer : Changing language on iOS 8.1 simulator does not work
My problem for this was an incorrectly encoded character in the localization file.

Resources