Skip to content

Command Line Tool for generating DeepL and Google Translate localizations

License

Notifications You must be signed in to change notification settings

gebes/localizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Localizer

Command Line Tool for generating DeepL and Google Translate localizations

Made with Go Go Version GoDoc GoReportCard License Latest release Gocover Gocover



Maintained? Maintainer

⚠️ Disclaimer

With this tool, you can only generate machine-generated localizations, which may not be 100% accurate. Therefore, always check over the generated localizations.

🔥 Get Started

💻 Installing the tool

👩‍🔬 Clone the repository

  1. Ensure you have the git client installed
  2. Run git clone github.com/Gebes/localizer
  3. Install the tool with go install ./cmd/localizer

⬇️ Download the executable

  1. Visit the releases page
  2. Download the executable for your operating system and architecture
  3. Unarchive with tar -xf file.tar.gz

🔨 Generate localizations

  1. 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
  1. Set SOURCE_LANGUAGE, TARGET_LANGUAGES_DEEPL and TARGET_LANGUAGES_GOOGLE as you desire
    • List of languages supported by DeepL
    • List of languages supported by Google Translate
    • SOURCE_LANGUAGE must be a single language and TARGET_LANGUAGES can be a list of languages or empty.
  2. Provide a
  3. Create a add.yaml and a file with the SOURCE_LANGUAGE (e. g. en.yaml)
  4. Add text that should be localized to add.yaml
ui:
  auth:
    button1: Text
    button_sign_in: Sign In
  1. 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

About

Command Line Tool for generating DeepL and Google Translate localizations

Topics

Resources

License

Stars

Watchers

Forks

Languages