Translation as file

Last updated: February 06, 2025Author: Jakub Pomykała
translation-as-file
File format value
translation-as-file

Translation as file is a plain text file format that allows you to export (or import) every translation key into a single file. This file format is useful when you want to synchronize markdown blog posts, documentation, or any other content that is not stored in your codebase.

This file format requires SimpleLocalize CLI version 2.8.0 or higher.

Special placeholder

With the translation as file format, you have use a special placeholder {translationKey} that will be replaced with the actual translation key value.

Upload with CLI

Example command to upload markdown blog posts:

simplelocalize upload --apiKey <PROJECT_KEY> \
  --uploadFormat translation-as-file \
  --uploadPath ./blog-posts/{lang}/{translationKey}.md

{translationKey} will be replaced with the actual translation key value, and {lang} will be replaced with the actual language code.

Example command to upload plain text files:

simplelocalize upload --apiKey <PROJECT_KEY> \
  --uploadFormat translation-as-file \
  --uploadPath ./public/{translationKey}/{lang}.txt

Learn more about SimpleLocalize CLI and translations upload feature.

Download with CLI

Example command to download markdown blog posts:

simplelocalize download --apiKey <PROJECT_KEY> \
  --downloadFormat translation-as-file \
  --downloadPath ./blog-posts/{translationKey}.md

Example command to download plain text files:

simplelocalize upload --apiKey <PROJECT_KEY> \
  --downloadFormat translation-as-file \
  --downloadPath ./public/{translationKey}/{lang}.txt

Learn more about SimpleLocalize CLI and translations download feature.

Was this helpful?