Replace the XCode Localizable.strings mush with a single Excel file.
- Converts localization key value pairs from Excel files to a localized directory structure and Localizable.strings files as used by Xcode.
- Takes care of conversion of special characters (linebreaks and so on)
Clone the project including submodules:
$ git clone --recursive https://github.com/robertoseidenberg/SBGXLSToLocalizableStrings.git
Build and run the project using XCode.
See the included HelloWorld.xls.
Command:
SBGXLSToLocalizableStrings HelloWorld.xls /Users/Me/.../MyProject/Localization/
HelloWorld.xls defines three language codes, therefore it generates the following directory structure:
* /.../Localization/
* en.lproj
* Localizable.strings
* es.lproj
* Localizable.strings
* fr.lproj
* Localizable.strings
It is most convenient to have a single Excel file in your project and generate localization directory tree at build time.
- Go to Xcode project settings
- Click: "Add Build phase"
- Name it: "GenerateLocalizedStrings files"
- Script:
{YOURPATH}/SBGXLSToLocalizableStrings {YOURPATH}/MyLocalizableStringsExcel.xls {GENERTED FILES DIR}
SBGXLSToLocalizableStrings makes heavy use these open source projects: