Skip to main content
Glot is a fast Rust-based CLI tool for checking internationalization (i18n) issues in Next.js projects using next-intl. It helps you catch hardcoded text that should use translation functions, find missing translation keys, and identify unused translations.

Key Features

Why Glot?

  • Fast: Built in Rust using the same parser as Next.js (swc)
  • Accurate: Understands JSX/TSX syntax and next-intl patterns
  • Configurable: Customize detection rules, ignored patterns, and checked attributes
  • CI-friendly: Perfect for automated pipelines with exit codes and structured output

How It Works

Glot parses your TSX/JSX files using the swc AST parser and visits each node to detect:
  1. Text content in JSX elements: <button>Submit</button>
  2. String expressions: <div>{"Hello"}</div>
  3. Conditional text: {loading ? "Loading..." : "Done"}
  4. Attribute values: <input placeholder="Enter email" />
Any text containing at least one Unicode alphabetic character is flagged as potentially hardcoded.

Quick Example

# Check your project for i18n issues
npx glot check

# Output:
# error: "Submit"  hardcoded-text
#   --> ./src/components/Button.tsx:5:22
#   |
# 5 |     return <button>Submit</button>;
#   |                    ^
#
# ✖ 1 problem (1 error, 0 warnings)

Next Steps

Quick Start

Install glot and run your first i18n check in 2 minutes