xcstringstool not producing all localisations

Hi iOS peeps !

Was just wondering if anyone has had this issue before with String Catalogs. I have an iOS project where I am using String Catalogs for localisation ( the project is split up into multiple local swift packages with each project having its own Localizable.xcstrings ) and the app currently only supports en as the base and en-US for US localisation

During the build process however some of the swift packages only produce the en-US localisation and is missing the en default localisation in the binary. Having a look at the build log for some xcstringstool will only produce one set of Localizable.strings (en-US.lproj) instead of (en.lproj and en-US.proj)

I haven't been able to find much documentation from Apple on xcstringstool as well / not sure where to find more info about this

Answered by Developer Tools Engineer in 825492022

Hello, String Catalogs do not build source language strings when the state is new, which is the default when strings are extracted from code and not further translated or varied in that language. To ensure a particular string builds anyway, you can choose Mark as Reviewed from the context menu to change the state to Translated.

You can learn more about String Catalogs here: https://developer.apple.com/videos/play/wwdc2023/10155

Hello, String Catalogs do not build source language strings when the state is new, which is the default when strings are extracted from code and not further translated or varied in that language. To ensure a particular string builds anyway, you can choose Mark as Reviewed from the context menu to change the state to Translated.

You can learn more about String Catalogs here: https://developer.apple.com/videos/play/wwdc2023/10155

Hello

Thanks for the response ! If our app supports multiple english variants ( english AU/NZ and english US ) would be the recommended approach be to have an en-US and en-AU localisation rather than relying the source language strings ?

At the moment it seems like provided only 1 of the strings within a string catalog is "marked as reviewed" xcstringstool will build all the source strings for that particular Localizable.xcstrings file, is this intended behaviour ?

Is there any available documentation around the .xcstrings file format, would love to learn more about it. Most of the available resources are within the context of Xcode

xcstringstool not producing all localisations
 
 
Q