How to localize an app in Xcode?

By Kristof, 15 December, 2021

Forum
App Development and Programming

Hello everybody,

I'm trying to localize an app in Xcode but I can't select languages anywhere.
I had previously managed to localize a simple app, but the method I used then doesn't seem to work now. Now I'm using Xcode 13.0.

The method I tried is:
* Build my app
* add a Localizable.strings and Localizable.stringsdict file
The app then works as expected.
* select the Localizable.strings file in the project navigator and then click the "Localize" button in the inspector pane
* Do the previous step also for the Localizable.stringsdict file
Now a folder has been created in my project called "en.lproj" which contains the .strings and .stringsdict file.
* Then I copied the folder and renamed it to "nl.lproj".
* I also created the folders "en.lproj" and "nl.lproj" in the root folder where I placed a "Mathematician-InfoPlist.strings" file. (the name of my app is "Mathematician")
* I exported the localization and made a "nl.xcloc" folder.
* When I import the localization again, it gives some warnings, but the files in the .lproj folders are modified correctly.

I expected that the project navigator now contains the following files: "Localizable.strings (Dutch)", "Localizable.strings (English)", "Localizable.stringsdict (Dutch)" and "Localizable.stringsdict (English)".
However, this is not the case and the new language does not seem to be recognized.

Does anyone know how to add/select languages using VoiceOver or with the help of a sighted person?

Thanks for the help.

With best regards,
Kristof

Options

Comments

By Kristof on Thursday, December 23, 2021 - 02:17

Hello everybody,

I succeeded to localize and translate my app.
By reading my previous posts again I found in the menus where you can add languages.

I think the first four steps of my original post are correct.
* Then I selected the project in the project navigator (top item)
* Then I navigated to project editor -> (project name) xcodeproj -> split view -> scrollbar -> Localization
There I could add languages.
* Then export, translate and import the localization again

With best regards,
Kristof