Get up and running with glot in just a few steps.Documentation Index
Fetch the complete documentation index at: https://glotctl.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Glot is distributed as an npm package calledglotctl. The CLI command is glot.
Initialize Configuration
Create a.glotrc.json configuration file:
Run Your First Check
Check your project for all i18n issues:| Type | Description |
|---|---|
| hardcoded | Untranslated text in JSX/TSX |
| missing | Keys used but not defined in locale files |
| unused | Keys in primary locale not used in code |
| orphan | Keys in non-primary locales but not in primary |
| replica-lag | Keys in primary locale missing from other locales |
| untranslated | Values identical to primary locale |
| type-mismatch | Type conflicts between locales |
| unresolved | Dynamic keys that cannot be analyzed |
Understanding the Output
Glot displays issues in a familiar format:- The problematic text in quotes
- The issue type (e.g.,
hardcoded-text) - File path and location
- Source code context with a pointer
Existing Projects
If your project already has many hardcoded strings, use the baseline command to suppress existing warnings and start fresh:// glot-disable-next-line comments above each hardcoded text, so you can add glot to CI immediately and gradually fix existing issues over time.
Fixing Issues
Replace hardcoded text with translation function calls:messages/en.json
Add to package.json
For convenience, add glot commands to yourpackage.json:
Using with CI
Glot returns exit code 1 when errors are found (exit 0 for warnings only), making it ideal for CI pipelines. Add a step to your workflow:Next Steps
Commands
Learn all available commands
Configuration
Customize glot for your project