This guide describes how to use multiple projects in Phrase to keep your growing localization project manageable.
As software projects grow and become more complex it helps to split them into modules to keep things manageable. The same holds true for the localization of software projects. You may want to limit the scope of your Phrase projects by splitting the translations into smaller categories, like frontend and backend for example.
- Create your projects in Phrase: For our example we will have the project “Frontend” and the project “Backend”.
- Create source locale files that correspond to the projects in Phrase.
- Create a CLI tool configuration that includes the locations of the source locale files in your project and match them to the corresponding Phrase projects:
- file: ./path/to/locales/frontend/en.yml
- file: ./path/to/locales/backend/en.yml
- file: ./path/to/locales/frontend/<locale_name>.yml
- file: ./path/to/locales/backend/<locale_name>.yml
Providing a config via --config flag
By default, the CLI will try to use a file called .phrase.yml on the same level at which phrase is run. To support more complex workflows, it is possible to use multiple configuration files for different purposes.
To force the CLI to use a configuration file for certain commands, please supply the corresponding .yml file via the --config flag like this:
$ phrase push --config ./path/to/config.yml