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 to use a special placeholder {translationKey}
that will be replaced with the actual translation key value.
Import multiple files via Web UI
To import multiple files into SimpleLocalize via Web UI, you can ZIP them and upload the ZIP file. The file name will be used as the key, and all files must always be in the same language, that you choose from the selector in the Web UI.
Upload with CLI
Example command to upload plain text files:
simplelocalize upload --apiKey <PROJECT_KEY> \
--uploadFormat translation-as-file \
--uploadPath ./blog-posts/{lang}/{translationKey}.txt
{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 plain text files:
simplelocalize download --apiKey <PROJECT_KEY> \
--downloadFormat translation-as-file \
--downloadPath ./blog-posts/{translationKey}.txt
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.