Usage
Here is a basic example of using the Polygot CLI, considering your project is already created and that the CLI is already logged in to your Polygot account.
1. Initialize your project
polygot init
This command will link your code base to your Polygot project. This will create a polygot.config.json
file as described in the configuration documentation page.
2. Push existing sources (optional)
polygot push sources
If this isn't a brand new project and that you already have source phrases, you should push them to the server to initialize them.
3. Push existing translations (optional)
polygot push translations
If this isn't a brand new project and that you already have translations, you should push them to the server so that they will not be regenerated during the next translation job.
4. Update your project content
When creating or updating any text content in your project, only use your source language, i.e. only edit your source locale file(s).
5. Generate translation
polygot synchronize
or
polygot push sources
polygot translate
polygot pull translations
Whenever you want to generate translations (the most common scenario is before deploying your product to production), run one of the above sequence of instructions.
6. Back to step 4
You can now resume developing your product and iterate on previous steps.