iOS internationalization

I have a Main.storyboard file and Main.strings files for several languages.


I want the text of a UILabel on the Main.storyboard to be retrieved from the Main.strings file corresponding to the current language.


I have defintions in the Main.strings file with the id's corresponding to the id's used is the Main.storyboard file.

"rzt-uf-E2B.text" = "<language specific text>";


Main.storyboard file label definition:

<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rzt-uf-E2B">

....


Currently the strings in the languange resource file are not used. What should I do to make it so that they are used?


Thanks in advance.

Sorry if I missed it - are you using 'Localization/Base'?


◅▻

Yes, I have 'Base internationalization' checked in 'Project/Info' which is how it shoulde be?


It seems to work ok.

I noticed that when I remove the text element from the corresponding label (or set it to an empty string) in the Storyboard source file, it just shows an empty text, so in that case it seems to use the setting from that file.

iOS internationalization
 
 
Q