• Documentation
  • CLI Client
  • Pull: Download Resources

Pull: Download Resources

Whenever there are updated translations on Transifex you want to use, you can get them by running tx pull.

Mode of the translated file

Transifex can provide different versions of a translation file depending on your needs – for example, you might only want reviewed translations in your file. These different versions are known as modes. You can specific the mode of the file you want to download by using the --mode option with the pull command.

Currently, the available modes are:

  • reviewed: the file will include reviewed strings in the target language. All other string will either be empty or in the source language depending on the file format.
  • developer: the file will be suitable for usage by developers in their source code tree.
  • translator: the file will be suitable for offline translation of the resource.

Pulling resource files

If you also want to pull new language files, you can add the -a|--all flag to the pull command. You should keep in mind however, that if you have not setup your project by using a file expression (sample here), you need to move and track the new translation files manually after downloading them

$ tx pull -a

Pulling specific resources

If you are interested in only a subset of the available resources of your project, you can use the -r/--resource option to push/pull files only for the specific (comma-separated) resources. You can also use Unix shell-style wildcards to easily select multiple resources.

# identify a resource using project_slug.resource_slug
$ tx pull -r transifex.core
$ tx pull -r 'transifex.co*'

Additionally, there is an option to work only on specific (comma-separated) languages, the -l/--language option.

$ tx pull -r transifex.core -l fr_FR

Depending on the size of the files and the number of languages, this process can take up to several minutes, as it requires uploading all files, parsing them, extracting the available strings and storing them into the database. To avoid misuse of the API, we have some throttling mechanisms in play. These should not interfere with your work. However, just to be safe, whenever pushing or pulling to/from the Transifex server, if you want a specific resource or language use the -r/--resource and -l/--language options of the push/pull commands to avoid pushing/pulling all of the tracked files.

Additional command options

There are additional options available for the tx pull command:

  • -s: Force the fetching of the source file (default: False).
  • -f: Force download of translations files.
  • --skip: Don't stop on errors. Useful when pushing many files concurrently.
  • --disable-overwrite: By default Transifex will fetch new translations files and replace existing ones. Use this flag if you want to disable this feature.
  • -h: Show the help screen for the command.
  • --mode: Specify the mode of the translation that is needed. See Defining the mode of the translated file for details.
  • --minimum-perc=MINIMUM_PERC: Specify the minimum acceptable percentage of a translation in order to download it.
  • --pseudo: Download a pseudo file as well.
  • -x, --xliff: Download an XLIFF file (ending with .xlf) along with the original file type. Note that this only works if you're on the Enterprise plan.