Reputation: 2164
I wanted to know how to generate the English base case Localizable.strings file in Xcode 13 without using genstrings.
I'm using the new compiler support to extract strings for localisation then exporting -> translating -> importing via the .xcloc
files. All this works nicely, aside from one problem...
I'm having difficulty getting it to create the initial Localizable.strings file in the development language, i.e. en
in my case. When I try and import the relevant en.xcloc
file nothing happens. I can import other languages without problem.
Here are the steps I am taking:
Correctly creates en.xcloc
file - contents as expected, picking up the text to be localised.
en.xcloc
fileThis does nothing. So I try the following:
English - Development Language
and French
optionsfr.xcloc
file and add translations requiredfr.xcloc
fileLocalizable.strings
file appears - it is of course the French versionen.xcloc
file still does nothingI think where I'm coming from, is that because one doesn't have to rely on genstrings in Xcode 13, I'm wondering how to create the initial translation files.
Upvotes: 5
Views: 2440
Reputation: 2164
Xcode only creates a Localizable.strings
file when importing the en.xcloc
file, assuming this is your development language, if you go into the exported en.xcloc
file and change one of the translations. Then when import the updated file a Localizable.strings
file will appear for en
, yet only containing the changes you have made, rather than entries for all the keys.
Upvotes: 3