This guide will walk you through setting up your first translation project with Gleef CLI in just a few minutes.Documentation Index
Fetch the complete documentation index at: https://docs.gleef.eu/llms.txt
Use this file to discover all available pages before exploring further.
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:This will:You’ll see progress output like:
- Analyze your local translation files
- Send new and modified keys to Gleef
- Publish all translations without asking your team for review (similar to an initial commit)
gleef push is the standard command for sending new and updated translations to Gleef. Use gleef translate when you want to generate AI translations and merge them back into your local files in one step.Example Project Structure
Here’s an example of how Gleef CLI works with a typical project structure:gleef init: Configuration is created
After gleef push: Keys are sent to Gleef
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 pushto send them to Gleef - Review translations in Gleef Studio
- Run
gleef pullto sync approved translations
Updating Existing Translations
- Modify existing keys in your local files
- Run
gleef pushto upload the updates - Review changes in Gleef Studio
- Run
gleef pull --add-newto sync all updates
Working with Multiple Developers
- Each developer runs
gleef pullbefore starting work - Make translation changes locally
- Run
gleef pushto upload 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