-
Notifications
You must be signed in to change notification settings - Fork 2
Getting Started
- If you do not have python, install python.
pip install localize
If you run into any errors during install, take a look at our Common Issues
pip install --upgrade localize
-
Log into your Localize account and go to the API Keys section of your Organization Settings.
-
Create a new API key. It can be scoped to a specific project but do not scope it to a specific method.
-
Open terminal and run the following:
$ localize config
It will then ask you for your project key
which you can find at the bottom of the API Keys page.
It will then ask for your API token
, which you can find by clicking view next to the API key you made in step 1.
-
Find and open the localize config, should be at the root of your user folder, on OS X/MacOS it is here:
/Users/USER_NAME/.localize/config.yml
. -
Add your
pull
andpush
files.
api:
project: YOUR_PROJECT_ID
token: YOUR_PUBLIC_KEY
pull:
targets:
- file: /PATH_TO_FILE/LANGAUGE_CODE.EXTENSION
push:
sources:
- file: /PATH_TO_FILE/LANGAUGE_CODE.EXTENSION
-
Replace the
- file:
value underpush:
with the absolute path to your source file. You can have many source files by adding a new- file
field. -
Replace the
- file:
path underpull:
with the absolute path to your new translated file. You can have many source files by adding a new- file
field.
Note: For the pull
file, the name can only be an active language code in that project. You do not need to create this file.
-
Run
localize push
-
Go to the phrases page for the project. Add or order translations for these new phrases.
-
Once everything has been translated run
localize pull
-
You now have a new translated file with all of the phrases from your source file.
-
Repeat the last 4 steps when any changes happen to your source file.