Keeping multiple PhraseApp projects for one localization project

As software projects grow and become more complex it helps to split them into modules to keep things managable. The same holds true for the localization of software projects. You may want to limit the scope of your PhraseApp projects by splitting the translations into smaller categories, like frontend and backend for example.

Workflow

  1. Create your projects in PhraseApp: For our example we will have the project “Frontend” and the project “Backend”.
  2. Create source locale files that correspond to the projects in PhraseApp.
  3. Create a CLI tool configuration that includes the locations of the source locale files in your project and match them to the corresponding PhraseApp projects:

  phraseapp:
    access_token: "3d7e6598d955bfcabaf1b9459df5692ac4c28a17793"
    file_format: yml
    push:
      sources:
        # frontend
        -
          file: ./path/to/locales/frontend/en.yml
          project_id: "5c05692a2a995c0c45c0c3cbfcab1"
          params:
            locale_id: "159d48e76802f789d9b8fb6d368e61bc"

        # backend
        -
          file: ./path/to/locales/backend/en.yml
          project_id: "0c45c0c3cbfcab15c05692a2a995c"
          params:
            locale_id: "fb6d368e61bc159d48e76802f789d9b8"
    pull:
      targets:
        # frontend
        -
          file: ./path/to/locales/frontend/<locale_name>.yml
          project_id: "5c05692a2a995c0c45c0c3cbfcab1"

        # backend
        -
          file: ./path/to/locales/backend/<locale_name>.yml
          project_id: "0c45c0c3cbfcab15c05692a2a995c"