How to add a localization to a settings.bundle? - ios

My app supports two languages. When I add a settings-bundle, it´s only in english. In Xcode 6.1 I found no way to add a localization to Settings.bundle. Did I miss something?

Nevertheless I found a working solution.
1) open Settings.bundle package
2) create new folder de.lproj (dont´t duplicate en.lproj - Finder don´t likes this)
3) copy Root.strings from en.lproj-folder to de.lproj-folder
4) now you can edit the new language in Xcode

It seems not working in Simulator. I am using Xcode 8.2.1.
OK. I find out the issue. In my Xcode project, the file Root.plist in Settings.bundle, there is one item missing: Strings Filename. I added this entry and set its value to Root, which is for language localization. With this missing item added, my app settings are working as expected in Simulator!
See my blog on this for more information.

Related

In iOS how can I remove languages from Localizable.strings with Xcode

This is how my xcode project looks. I would like to remove the Localizable.strings for UK and US and just keep the Localizable.strings for English. How can I do this?
Follow the instructions in the image below
You can just select the specific files and delete them from the project. Just make sure that in the file inspector as well they are removed for the Localizable.strings.

Adding localized files to a new IOS 7 app

I'm starting to studying app localizations and I'm stuck at the very beginning.. I've created a new project called LocalizedStrings2:
I click the plus button to add Italian Language and it offers me to localize 2 InfoPlist.strings files:
Is this correct? BTW, I add the italian language:
Then I've wrote the following code in the English InfoPlist.strings file:
"ERR_MSG" = "Error Message!"
The following line has been entered in the Italian version of the file:
"ERR_MSG" = "Messaggio d'errore!"
When I compile I receive the following error (I have the same error even if the two files are empty:
Any hint or good reference for up-to-date How To Localize my IOS App documentation?
Thanks in advance for any help!
Gianni
I was facing the same problem for many days. Then I figured it out…
Just put a ; at the end of the line and it's fixed! :D
Recommendation
I don't think you should have two English references to your file in the UI. Change one to italian and verify that the files are in the proper location in your finder folder.
I would then consider removing the file references from the project and re-add them. I've noticed some peculiar behaviors when using localization for older versions of the SDK in Xcode 5+. BTW - If you are planning to support a deployment target of iOS5 you will need to remove the Base localization setting and just create the localization folders manually (inside the project folder in Finder). After you re-add the files I would check the Build Phases > Copy Bundle Resources > search for plist to verify that ProjectName/(localization).lproj is found.
NOTE
Please check out the updated documentation and let me know if that is a sufficient answer.
Internationalizing Your App
I guess the second InfoPlist.strings file derives trom your tests.
Check out the "Supporting Files-Folder" in your apps test target.

iOS - error during archiving noting UAPushLocalization.bundle/en.lproj/Localizable.strings

I created a new set of controllers and when I tried to archive the new code, I got this error which happened when the archiving was going over those controllers:
error: open /Users/owner12/Library/Developer/Xcode/DerivedData/Marketing-eusiyfrkjsbjfxdgpauubwhvpazb/Build/Intermediates/ArchiveIntermediates/Marketing/InstallationBuildProductsLocation/Applications/Marketing.app/UAPushLocalization.bundle/en.lproj/Localizable.strings: No such file or directory
I understand that it is talking about the push-enabling library. And something about some localization setting.
But I have no idea how to fix this.
Would anyone be able to suggest how to fix this?
And here is the screen shot of this reference highlighted in red in the Build Phases --> Copy Bundle Resources list.
Thanks,
Alex
Xcode has some weird issues with localization from time to time. I would recommend you to copy all the text in the EN localization file (expand the localization strings file and select the english one "en"). Paste it somewhere, right click the file, show in finder, delete, select the localizations file, uncheck localization for english, clean your project, select the localization file, check the english one (a new file will be created) and paste your strings here.
Also make sure there are no typos in it.

How do two info.plist files in Xcode project work?

I have two info.plist files in a Xcode project and are labeled below. Can someone explain how these work with localization?
Project - EN-Info.plist
Project - FR-Info.plist
With Xcode 4.6 just select file "EN-Info.plist" and in the right pane show file inspector and check english in localization section, do same thing with "FR-Info.plist" and check french

Remove an iOS app localization

In Bombr 1.2 I added a half-assed French localization, over time adding more strings to localize I've decided to drop the French localization. In Bombr 1.2.1 I removed the reference to fr.lproj/Localizable.strings from the Xcode project but the file still exists. Now that 1.2.1 is on the app store it still says that French is a supported language.
Will removing the fr.lproj folder and resubmitting correctly display the supported languages (this is my hunch), or is it possibly that iTunes Connect will not allow you to drop support for a language?
(I took a year of French in high school for fun, but not enough to translate my own app.)
Building on the answer given by #vanya, select your project from the list and delete the language under in the "localization" section.
If you want to remove app metadata localization, there's a delete menu on iTunesConnect
try to look at the info.plist which defines localizations and I guess some work in iTunesConnect should be done as well, but before approving an app
To remove the localization from Xcode (I'm using 4.2 on Snow Leopard) click on the file/folder in the sidebar, "Localizable.strings" and open the File Inspector (keyboard shortcut cmd-opt-1 or View > Utilities > Show File Inspector in the menu bar). You'll see a Localization pane with your localizations listed. Select the one you want to remove and click the minus sign to delete it.
So I landed on this question, but with some specific criteria:
I want to remove the base development language (English)
I want to keep the localized language (French)
None of the above answers worked and I couldn't find anything better on Stack Overflow. Eventually I found this gem: XCode: Remove localizations on build.
I develop in English, so the entire base of the app is in the English localisation. I then translated it into Finnish for the first release, but the intention was to only release the Finnish content and not the English.
Setting up a small script during a final Build phase works wonders to strip unwanted localisations:
#Remove english
rm -r "${TARGET_BUILD_DIR}/${PRODUCT_NAME}.app/en.lproj"
# Remove base (iOS 9)
rm -r "${TARGET_BUILD_DIR}/${PRODUCT_NAME}.app/Base.lproj"
Then I had some runtime errors because some Storyboard files were localized and located in the Base.lproj folder. I worked around this by doing the following:
Un-localized those Storyboards (unchecked all languages) and then "Moved to trash"
Dragged the Storyboards from the trash back into the project. (Basically moving the Storyboards from Base.lproj folder – which the script would delete – to the project folder.)
Note: none of these Storyboards were actually localized (the .strings files were all empty). All the translations were properly set in code using NSLocalizedString.

Resources