General
Does glot work with i18next / react-intl / other i18n libraries?
Does glot work with i18next / react-intl / other i18n libraries?
No. Glot is designed specifically for next-intl. Translation key analysis (missing, unused, orphan, replica-lag, etc.) relies on next-intl’s
useTranslations and getTranslations patterns.However, hardcoded text detection works regardless of your i18n library — it simply finds text in JSX/TSX that isn’t wrapped in a translation function.Does glot work with Vue, Angular, or Svelte?
Does glot work with Vue, Angular, or Svelte?
No. Glot only parses JSX/TSX files and is built for Next.js projects. It uses swc (the same parser Next.js uses) to parse your source code.
Does glot support YAML, PO, or XLIFF translation files?
Does glot support YAML, PO, or XLIFF translation files?
No. Glot only supports JSON locale files (e.g.,
messages/en.json). This is the format used by next-intl.Can I use glot in a monorepo?
Can I use glot in a monorepo?
Yes. Set See Common Configurations for more examples.
sourceRoot and messagesRoot to point to the correct locations:.glotrc.json
Does glot modify my source code?
Does glot modify my source code?
Only two commands modify files, and both require explicit
--apply flags:glot baseline --apply— inserts// glot-disable-next-linecommentsglot fix --apply— inserts/* glot-message-keys */commentsglot clean --apply— removes unused keys from JSON locale files
--apply, these commands only show a preview (dry run). All other commands (check, init, serve) are read-only.How fast is glot?
How fast is glot?
Glot is built in Rust and uses swc for parsing, making it very fast. Typical performance:
- Small projects (~50 files): under 1 second
- Medium projects (~500 files): 1–3 seconds
- Large projects (~2000+ files): 3–10 seconds
includes and ignores configuration options.What versions of Next.js and next-intl are supported?
What versions of Next.js and next-intl are supported?
Glot works with any version of Next.js (App Router and Pages Router) and any version of next-intl, as long as your project follows the standard patterns:
useTranslations/getTranslationsfor obtaining translation functions- JSON-based locale files (e.g.,
messages/en.json)
Does glot work on Windows, macOS, and Linux?
Does glot work on Windows, macOS, and Linux?
Yes. Glot is distributed as a pre-compiled npm package with binaries for:
- macOS (Apple Silicon and Intel)
- Linux (x64 and ARM64)
- Windows (x64)
npm install -D glotctl, the correct binary is selected automatically.Detection Issues
Why is some text not being detected?
Why is some text not being detected?
Common reasons:
-
File not in
includespaths — glot only scans directories listed in your.glotrc.jsonincludesconfig. Check that the file’s directory is included. -
File is a test file — by default,
ignoreTestFilesistrue, which skips*.test.*,*.spec.*, and__tests__/files. -
Text has no alphabetic characters — glot only flags text containing at least one Unicode alphabetic character. Pure numbers (
123) and symbols (---,$100) are ignored. -
Suppressed by directive — check if there’s a
glot-disable-next-lineorglot-disablecomment above the text. -
Attribute not in
checkedAttributes— only attributes listed incheckedAttributesare checked. Custom attributes likelabelordescriptionare not checked by default. -
Text matches
ignoreTextspattern — check your.glotrc.jsonfor ignored text patterns.
-v (verbose) to see which files are being scanned:I'm getting false positives — how do I suppress them?
I'm getting false positives — how do I suppress them?
Several options, from most to least specific:
-
Single line: Add
// glot-disable-next-line(or{/* glot-disable-next-line */}in JSX) above the line. -
Block: Wrap with
// glot-disableand// glot-enable. -
Specific text patterns: Add to
ignoreTextsin.glotrc.json: -
Entire file: Place
// glot-disableon line 1 or 2. -
Entire directory: Add the path to
ignoresin.glotrc.json.
Why does "glot clean" refuse to run?
Why does "glot clean" refuse to run?
glot clean refuses to run when your code has unresolved dynamic keys — translation keys that use variables or template literals that glot can’t statically analyze:glot-message-keys annotations:fix command to auto-insert them:glot clean will run safely.See Unresolved Keys and glot fix for details.Why are brand names / technical terms flagged?
Why are brand names / technical terms flagged?
Glot flags any text containing alphabetic characters. Brand names like “Google” or technical terms like “TypeScript” will be flagged.Suppress them per-line:Or globally via
ignoreTexts:Configuration Issues
Glot says "Directory does not exist" for my includes path
Glot says "Directory does not exist" for my includes path
Glot validates that directories in
includes exist. Common causes:-
Wrong relative path — paths in
includesare relative tosourceRoot. IfsourceRootis"./src"and you have"includes": ["app"], glot looks for./src/app. -
Dynamic route syntax —
[locale]is treated as a literal folder name. Make sure the folder[locale]actually exists on disk. -
Missing directory — the directory may not exist in your project. Update
includesto match your actual structure.
Where should I place .glotrc.json?
Where should I place .glotrc.json?
Place it in your project root (next to
package.json). Glot searches upward from the current directory until it finds .glotrc.json or a .git directory.See Configuration Resolution for the full search algorithm.CI / Integration Issues
What exit codes does glot use?
What exit codes does glot use?
| Code | Meaning |
|---|---|
| 0 | No errors (warnings may exist) |
| 1 | Errors found |
glot check in CI will only fail the build on actual errors, not warnings.How do I adopt glot in a project with many existing issues?
How do I adopt glot in a project with many existing issues?
Use the baseline workflow:
- Run
npx glot baseline --applyto suppress all existing hardcoded text warnings - Add
glot checkto CI — new issues will be caught immediately - Gradually fix existing issues and remove suppression comments over time