Using ‘genstrings’ tool from Apple which included into Xcode
Step 1. Generate Localizable.strings to get all of strings you want to localize.
- Open terminal and go to your project’s folder:
cd PathToYourProject
- Run:
find . -name '*.swift' -print | xargs -n1 genstrings -a
- After this step, a
Localizable.strings
will automatically generated
Step 2. Add Localizable.strings in your project.
Step 3: Add languages for your Localizable.strings
:
- Now click on the file you just added
Localizable.strings
- On right side of Xcode, choose
Show the File inspector
>Localization
> Press button:Localize...
- One pop up will show to asks you which languages you wanna add, choose one please! 🤗
Step 4. Add languages which you want to localize to your project.
On the left side of Xcode, choose Show the project navigator
> Choose your project:
Step 5: Setup your schemes:
- Edit your sheme
- Change your region + language that you want