Command Line Tool for generating DeepL and Google Translate localizations
With this tool, you can only generate machine-generated localizations, which may not be 100% accurate. Therefore, always check over the generated localizations.
- Ensure you have the git client installed
- Run
git clone github.com/Gebes/localizer
- Install the tool with
go install ./cmd/localizer
- Visit the releases page
- Download the executable for your operating system and architecture
- Unarchive with
tar -xf file.tar.gz
- Create a .env file
DEEPL_API_KEY=key:fx
GOOGLE_APPLICATION_CREDENTIALS=./google-cloud.json
SOURCE_LANGUAGE=en
TARGET_LANGUAGES_DEEPL=bg,es,de,ru
TARGET_LANGUAGES_GOOGLE=id,it,ja
- Set
SOURCE_LANGUAGE
,TARGET_LANGUAGES_DEEPL
andTARGET_LANGUAGES_GOOGLE
as you desire - Provide a
- DeepL API Key if
TARGET_LANGUAGES_DEEPL
is not empty - Google Cloud Json with Cloud Translation API enabled if
TARGET_LANGUAGES_GOOGLE
is not empty
- DeepL API Key if
- Create a
add.yaml
and a file with theSOURCE_LANGUAGE
(e. g.en.yaml
) - Add text that should be localized to
add.yaml
ui:
auth:
button1: Text
button_sign_in: Sign In
- Generate localizations by running
localizer .
(dot specifies the current folder as target)- The tool will take all the values from
add.yaml
and add the values with the same path translated into the corresponding{lang}.yaml
file - After the translations are done
add.yaml
will be cleared
- The tool will take all the values from