glotto
v2.8.0
Published
A tool for translating i18n JSON files using AI services.
Downloads
30
Readme
Glotto AI Translator
Glotto is a powerful tool designed to translate i18n JSON files using advanced AI technology. It streamlines the localization process by automatically translating your language files to any target language while maintaining the JSON structure.
Features
- Translate JSON files while preserving the original structure
- Support for multiple language pairs
- Configurable batch processing with customizable key limits
- Command-line interface for easy integration into your workflow
Installation
Glotto can be installed and used through either JSR (Deno) or npm. Choose the method that best suits your development environment.
JSR (Deno)
Global Installation
Install Glotto globally to use it as a CLI tool from anywhere:
deno install --global --name glotto -A jsr:@ibodev/glottoDirect Execution
Alternatively, run Glotto directly without installation:
deno run -A jsr:@ibodev/glottonpm (Node)
Global Installation
Install Glotto globally via npm to use it as a CLI tool:
npm install --global glottoAfter installation, the glotto command will be available in your terminal.
Direct Execution
Run Glotto directly using npx without installation:
npx glottoUsage
Basic usage (default Gemini)
glotto --key <gemini-api-key> -i en.json -o ar.json -f English -t ArabicUse OpenAI instead of Gemini
glotto --key <openai-api-key> --input=en.json --output=tr.json --from=English --to=Turkish -p openaiOptional custom OpenAI base URL:
glotto --key <openai-api-key> --input=en.json --output=tr.json --from=English --to=Turkish -p openai --url=https://api.openai.com/v1Use Anthropic (Claude)
glotto --key <anthropic-api-key> --input=en.json --output=tr.json --from=English --to=Turkish -p anthropicOptional custom Anthropic base URL:
glotto --key <anthropic-api-key> --input=en.json --output=tr.json --from=English --to=Turkish -p anthropic --url=https://api.anthropic.comOverride default model for a provider:
glotto --key <openai-api-key> --input=en.json --output=tr.json --from=English --to=Turkish -p openai -m gpt-4.1Parameters
--key: API key for the selected AI provider--inputor-i: Source JSON file--outputor-o: Target JSON file--fromor-f: Source language--toor-t: Target language--provideror-p: AI provider (gemini|openai|anthropic, default:gemini)--modelor-m: Model name for the selected provider (defaults:gemini-2.5-flash,gpt-4.1-mini,claude-3-5-haiku-latest)--url: Custom base URL for OpenAI/Anthropic (optional)
Development
To run the project in development mode:
deno task cli --key <gemini-or-openai-api-key> --input=en.json --output=tr.json --from=English --to=Turkish -p geminiBuilding the Project
To create a production build:
deno task buildContributing
Contributions are welcome! Feel free to submit issues and pull requests.
License
MIT Licence @ 2026
