Currently using Xcode 6.3
In our (open source) application we have two targets:
Both targets have localized strings via NSLocalizedString().
When I "Export for Localization", I see one <file> extension in the exported XLIFF file named Client/Localizable.strings that contains the strings for both the main application and the app extension.
Same results when doing an export from the command line via xcodebuild.
I am very sure that this export behavior changed over time: previously the strings from the app extension would end up in a separate Extensions/ShareTo/Localizable.strings entry in the XLIFF file. Not combined in Client/Localizable.strings.
So now I am wondering, is this new and correct behavior? Does this mean that app extensions lookup strings in their parent's bundle?
It really doesn't matter. If Xcode likes one, then you can concat both files together.
In larger projects, instead of one Localizable.strings, we would use multiple .strings file, one for each class or one for each class assigned for a particular class using NSLocalizedStringFromTable();
Just make sure that the strings file is copied to both bundles (check the file inspector, right sidebar first tab).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With