Prerequisites
Before starting, make sure you have:- Installed Gleef CLI
- Authenticated with your API key
- A project with existing localization files (JSON, XML, YAML, or .strings)
Step-by-Step Setup
Initialize Gleef
Run the initialization command to set up Gleef in your project:This command will:
- Prompt you to enter your locale file pattern using
{locale}placeholder - Validate the pattern by loading your existing files
- Map file/folder names to company locales if needed
- Create a
.gleef/config.jsonconfiguration file
Common Patterns by Technology
Here are typical patterns you might enter based on your stack:Always use the
{locale} placeholder in your pattern - it’s required for proper locale detection.Complete the setup
After entering your pattern and mapping any locales, you’ll see output like:Check the generated
.gleef/config.json file to verify the configuration matches your project structure.Push your first translations
Upload your existing translation keys to Gleef for AI translation:This will:You’ll see progress output like:
- Analyze your local translation files
- Send new keys to Gleef for AI translation
- Publish all translations without asking your team for review (similar to an initial commit)
Use
gleef translate for AI-powered translation. Use gleef push only when uploading manual edits without generating translation.Example Project Structure
Here’s an example of how Gleef CLI works with a typical project structure:gleef init: Configuration is created
After gleef translate: Keys are sent to Gleef for translation
After gleef pull: Local files are updated with new translations
Configuration File Example
After runninggleef init, you’ll have a .gleef/config.json file like this:
- localeFilePatterns: Your pattern with
{locale}placeholder - formatOptions: Auto-detected based on your file types
- customLocaleNames: Only added if your files don’t match standard locale names
Common Workflows
All commands can be added to your CI/CD or build scripts to automate updating or creating translations.
Adding New Translation Keys
- Add new keys to your base language file (e.g.,
en-US.json) - Run
gleef translateto send them for translation - Review translations in Gleef Studio
- Run
gleef pullto sync approved translations
Updating Existing Translations
- Modify existing keys in your local files
- Run
gleef translateto update the translations - Review changes in Gleef Studio
- Run
gleef pull --allto sync all updates
Working with Multiple Developers
- Each developer runs
gleef pullbefore starting work - Make translation changes locally
- Run
gleef translateto push changes - Coordinate reviews in Gleef Studio
- Run
gleef pullto get the latest approved translations
Next Steps
Learn All Commands
Explore all available CLI commands and their options
Workflow Guide
Understand advanced workflows and best practices
Configuration Options
Customize Gleef CLI for your project needs
Troubleshooting
Solve common issues and get help