go-i18n-ai

command module
v0.0.0-...-9d57e85 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2023 License: MIT Imports: 16 Imported by: 0

README

go-i18n-ai

go-i18n-ai is a cli tool to automatically translate your base i18n json file into selected languages using openAI api

Prerequisites

  • golang >= v1.20.0
  • openai api key

Installation

go install github.com/mhmodo10/go-i18n-ai

Help

go-i18n-ai --help

Usage

go-i18n-ai --base <code of base language> --src <path to base language directory> --t <target language code> -k <your openai api key>

Example

go-i18n-ai --base en --src ./lang/ --t nl -k someOpenAiApiKey

Flags

Flag Description Aliases Required
base the language code of the base language b Yes
source The source directory where the base language file is located src, s Yes
targets The language code of the target language(s) repeat to pass multiple values t Yes
key The openAI API key to be used for translations k Yes
model The openAI API model to be used for translations m No
out Where the translation files should be saved o No

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL