OpenClaw for localization.
Automatically internationalize your React application.
Globalyze scans your codebase, extracts UI strings, generates semantic translation keys, rewrites components, and produces ready-to-use locale files.
Run one command:
globalyze globalize
And your app becomes multilingual.
Before:
<button>Pay now</button>Run:
globalyze globalizeAfter:
<button>{t("checkout.pay_button")}</button>Globalyze also generates locale files automatically:
{
"checkout.pay_button": "Pay now"
}Install Globalyze:
bun add -g github:Bil0000/GlobalyzeConfigure environment variables in .env (see Environment Variables below) before initializing:
OPENAI_API_KEY=your_openai_key
GEMINI_API_KEY=your_gemini_key
LINGO_API_KEY=your_lingo_key
OPENAI_API_KEY_2=your_second_openai_key # Optional
GEMINI_API_KEY_2=your_second_gemini_key # OptionalInitialize your project:
globalyze initRun the first-time migration:
globalyze globalizeKeep translations updated later:
globalyze syncGlobalyze includes an AI skill for agent workflows.
Install:
npx skills add Bil0000/Globalyze --skill globalyzeThis enables Cursor / Codex / AI agents to use the CLI correctly.
Traditional i18n libraries such as:
- react-i18next
- next-intl
- react-intl
handle runtime translations.
They expect developers to manually:
- extract UI strings
- add translation keys
- rewrite components
- maintain locale files
Globalyze automates this process.
Instead of manually converting your application, Globalyze automatically internationalizes the codebase using AST transforms.
You still use a runtime library for translations, but Globalyze handles the migration and lifecycle.
Typical localization workflow:
- Find UI strings
- Create translation keys
- Rewrite components
- Create locale files
- Maintain translations
With Globalyze:
- Run
globalyze globalize - Add a language picker
That's it.
Globalyze provides automated internationalization using:
- AST-based source extraction from React code
- semantic translation key generation
- runtime adapter integration
- automatic locale file generation
- incremental sync workflows
- automated translation using Lingo.dev
Globalyze also includes advanced localization tooling:
- translation graph inspection
- duplicate translation detection
- unused key cleanup
- ownership and governance controls
- OCR screenshot review for missing strings
- AI-assisted workflows
- project localization health analysis
Globalyze supports common React project structures:
- Next.js App Router
- Next.js Pages Router
- Vite React
- Remix
- TanStack Start
- React Router SPAs
- standard React entry-point apps
Supported adapters:
genericcustomreact-i18nextnext-intlreact-intl
Adapters determine how runtime translation calls and providers are wired.
bun add -g github:Bil0000/GlobalyzeVerify installation:
globalyze --helpUpdate later:
globalyze updateIf you are developing Globalyze itself:
git clone https://github.com/Bil0000/Globalyze.git
cd globalyze
bun install
bun linkGlobalyze uses a .env file:
OPENAI_API_KEY=your_openai_key
OPENAI_API_KEY_2=your_second_openai_key
GEMINI_API_KEY=your_gemini_key
GEMINI_API_KEY_2=your_second_gemini_key
LINGO_API_KEY=your_lingo_keyGlobalyze supports multiple API keys.
Order used:
OPENAI_API_KEYOPENAI_API_KEY_2OPENAI_API_KEY_3- Gemini fallback keys
If all keys are rate-limited, Globalyze falls back to deterministic key generation.
globalyze initThis command:
- detects project languages
- selects runtime adapter
- configures locale structure
- optionally installs adapter dependencies
- optionally wires runtime providers
- generates language switcher helpers
- creates
globalyze.config.ts
globalyze globalizeThis command:
- scans the codebase
- extracts UI strings
- generates translation keys
- rewrites components
- generates locale files
- translates target languages
- updates runtime manifests
- runs a post-migration audit
globalyze syncThis command:
- detects new UI strings
- updates locale files
- fills missing translations
- refreshes runtime artifacts
- updates translation graph
- runs a post-sync audit
| Command | Purpose |
|---|---|
init |
configure project |
globalize |
convert project to use translations |
sync |
maintain translations |
watch |
auto-sync during development |
analyze |
localization health report |
audit |
detect missed UI strings |
Globalyze can scaffold runtime integration automatically.
Depending on framework and adapter it may generate:
src/i18n.tssrc/i18n/useLocale.tssrc/i18n/runtime.tssrc/components/GlobalyzeLanguageSwitcher.tsxsrc/runtime/languageLabels.tssrc/lib/i18n/translations.generated.ts
If safe runtime wiring cannot be performed automatically, Globalyze generates:
globalyze.runtime.md
with manual instructions.
Globalyze can generate:
GlobalyzeLanguageSwitcher- locale hooks
- language label helpers
- optional development floating switcher
Developers can place the switcher anywhere in the UI.
Globalyze includes a GitHub Action that runs on every pull request. You can copy it directly from this repo, it works out of the box on your project.
-
Copy the workflow file into your repo:
mkdir -p .github/workflows curl -o .github/workflows/globalyze.yml https://raw.githubusercontent.com/Bil0000/Globalyze/main/.github/workflows/globalyze.yml
Or manually copy
.github/workflows/globalyze.ymlinto your project. -
Add repository secrets (Settings → Secrets and variables → Actions):
Secret Purpose GLOBALYZE_OPENAI_API_KEYOpenAI API key for translation GLOBALYZE_GEMINI_API_KEYGemini API key (fallback) GLOBALYZE_LINGO_API_KEYLingo.dev API key for automated translation -
Add a repository variable (Settings → Secrets and variables → Actions → Variables):
Variable Value GLOBALYZE_INSTALL_SOURCEgithub:Bil0000/GlobalyzeThis tells the workflow where to install Globalyze from. If you use a fork or a different install source, set it accordingly.
On every pull request, the workflow:
- Installs Globalyze and runs
globalyze syncto update locale files - Commits and pushes any translation changes back to the PR branch (so reviewers see up-to-date translations)
- Runs
globalyze scan --fail-on-findingsto check for hardcoded UI strings - Runs
globalyze sync --checkto verify locale coverage
If the scan finds hardcoded strings or coverage is missing, the workflow fails—keeping your localization in sync with CI.
Note: For pull requests from forks, the workflow cannot push commits. It will still run the sync and checks, but you'll need to run globalyze sync locally to apply fixes.
Globalyze is designed for large codebases:
- extraction caching
- bounded concurrency
- incremental sync workflows
- locale reuse
- generated artifact exclusion from scanning
The first globalize run is the heaviest operation.
Later sync runs are much faster.
MIT
