The problem my IOS app is facing is that all texts, titles, labels to be translated automatically in the Storyboard are not. At the same time, all texts, titles, labels to be translated by my Swift code, using NSLocalizableStrings are working well.
Here is my environment :
- Xcode v 9.4.1
Development Language : English
Localization, English - 6 files localized
- Development Language : French - 2 files localized (this line is below the other, correct ?)
Main.Storyboard includes:
- Main.Storyboard (Base)
- Main.strings (English), which contains all translations in English
The .strings files are correct and contains the translations for NSLocalizable functions
- I have done Export for Localization to get an en.xliff file
- In the file, it says source=fr and target=en, which is good
- I have translated labels, titles, texts, etc in the en .xliff file
- I have done Import for Localization using the en .xliff file
To test localization, I do Edit Scheme / Run, with Application Language set to English and Application Region set to System Region
What I see :
Whatever the view, all texts to be translated by a NSLocalizableString function in the Swift code are correctly translated and displayed as expected. Good
But, all texts to be translated automatically by the Storyboard are still displayed in French. All of them (View Title, Button, Label, etc). It looks like the Main.strings (English) is not read at all.
This last part is supposed to be straight forward, isn’t it ?
I have removed three times English and redo the full Localization process, with no effect.
My backup solution is to move all translations into the Swift code and not take advantage of the Storyboard automated translations, but honestly this is not exciting.
Any clue ? Any help ? Many thanks