1.3.0 • Published 1 year ago
champollion-ai v1.3.0
Get started
- Install package
npm i champollion-ai
# or
yarn add champollion-ai
- Create a champo.config.json at root of your project
{
"translationFolder": "./translations",
"inputLang": "fr-FR",
"outputLang": ["en-US", "es-ES", "it-IT"],
// optionnal
"excludedFiles": ["file_excluded.ts"],
"includedFiles": ["file_to_translate.json"],
"generatedLangFolderPrefix": "ai-generated_"
}
- Export your api key
export CHAMPOLLION_API_KEY=your_api_key # replace with yours
- Run translation script
npx champo translate
It will translate all files in ./{translationFolder}/{inputLang} in desired languages automatically.