This generator use sourcekitten. It must be installed. Follow the instructions on github page to install
Needs the sourcekitten framework to convert your project's swift code to AST (Abstract Syntax Tree) and extract strings translated using the localizedWith translation function.
Download all swift files in hte same directory and compile
swiftc *.swift -o <name_of_the_executable>
You can use precompiled executable 'byvLocalizableStringsGenerator'
- Localize project using ByvLocalizations and it's extensions
- Copy generated executable in a folder inside project root, (e.g.
/generator/byvLocalizableStringsGenerator
) - Open terminal in executable folder and execute
./byvLocalizableStringsGenerator
all.strings file with all translations and a file with new translations in all languages of your project (e.g. all.strings, Base.string, en.string)
- Copy the generated en.strings to the 'en.lproj' folder
- Rename 'Base.strings' to 'Localizable.strings' (If file exist add Base.strings new lines to your previous file)
- Repeat 5 and 6 for every language folder (e.g. 'es.lproj')
- Translate
- Add all Localizable.strings files to your "Copy bundle resources" under build phases
- lean build (Shift + Cmd + K) and run (Cmd + R)
USE AT OWN RISK