Quick Localization: Genstrings

I am trying to prepare my application for transfer to translators for localization, but I am having some problems. I added the file “Localizable.strings” to my project and I checked “Use basic internationalization”.

However, looking at my application in Xcode, I don’t see any “Base.lproj" or "en.lproj" or .lproj files for any language, although when I open my application in Finder, I see "en.lproj" and "es.lproj".

I suggest that this may be the reason the genstrings utility is not working properly for me. I have many calls in my code, for example self.navigationItem.title = NSLocalizedString(...) , but when I execute genstrings *.swift , nothing changes in Localizable.strings, and I still do not see any .lproj folders .

+5
source share
1 answer

Xcode does not automatically add the files you generated to the build path, you must manually add them. In addition, genstrings generates a Localizable.strings file that can then be localized. In order to generate the lproj files you were talking about, you must localize the Main.storyboard file.

0
source

All Articles