Remove an iOS app localization
Asked Answered
K

5

18

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.)

Katzenjammer answered 18/7, 2011 at 16:59 Comment(5)
Maybe you could find someone who knows French who could help you support the language?Seeder
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 appMatney
Adding a new version in iTunes Connect allows me to add localizations, but no button to directly delete. I've added CFBundleLocalizations (aka Localizations) to my Info.plist excluding fr and I've deleted the fr.lproj directory. Once I upload we'll know.Katzenjammer
Vanya can you repost your comment as an answer so I can mark it as the accepted answer? Thanks.Katzenjammer
Nick that's a good idea, but it's far down on my todo list. :( Also I would like to know how iTunes connect looks for supported localizations.Katzenjammer
M
6

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

Matney answered 19/7, 2011 at 13:12 Comment(1)
That did it, thanks for pointing where to look. Info.plist has a key CFBundleLocalizations which Xcode displays as Localizations is an array where you list the country codes. I did not do anything in iTunes Connect, but now it correctly reads the binary details after upload.Katzenjammer
E
18

Building on the answer given by @vanya, select your project from the list and delete the language under in the "localization" section.

XCode

Erubescence answered 2/12, 2014 at 21:51 Comment(2)
Flimm, make sure you select the project (and not one of your targets) in the menu on the left-hand side. The list of localizations should then be visible.Erubescence
Also clean and rebuild the project.Geosphere
S
13

If you want to remove app metadata localization, there's a delete menu on iTunesConnect

enter image description here

Suzannsuzanna answered 9/4, 2013 at 0:23 Comment(2)
The Delete button is disabled for me :-(Chuckle
The Delete button is only available on non-default languages.Fantinlatour
M
6

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

Matney answered 19/7, 2011 at 13:12 Comment(1)
That did it, thanks for pointing where to look. Info.plist has a key CFBundleLocalizations which Xcode displays as Localizations is an array where you list the country codes. I did not do anything in iTunes Connect, but now it correctly reads the binary details after upload.Katzenjammer
L
6

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.

Lythraceous answered 28/3, 2012 at 17:56 Comment(0)
K
3

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.

Karlise answered 22/11, 2018 at 20:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.