This document covers the internationalization (i18n) setup for the Sim platform, specifically focusing on the documentation system's automated translation pipeline and the UI's multi-language support. The system uses AI-powered translation to maintain documentation parity across multiple languages.
The Sim platform implements an automated translation pipeline for its documentation using Lingo.dev's AI translation engine. The system translates English documentation into five target languages: Spanish (es), French (fr), Chinese (zh), Japanese (ja), and German (de).
Key characteristics:
workflow_dispatch on-demand `.github/workflows/i18n.yml4-5apps/docs site uses fumadocs-ui and fumadocs-mdx to provide a localized documentation experience `apps/docs/package.json25-27Sources: `.github/workflows/i18n.yml1-178 `apps/docs/package.json17-36
The translation system bridges the "Natural Language Space" (source MDX files) and the "Code Entity Space" (automated workflows and i18n providers).
Translation Flow:
lingo.dev CLI scans English documentation in apps/docs/content/docs/en/ `.github/workflows/i18n.yml47apps/docs/i18n.lock to identify new or modified content blocks using checksums `apps/docs/i18n.lock2-3content/docs/es/) `.github/workflows/i18n.yml56bun run build is executed in the docs workspace to ensure translated MDX components remain valid `.github/workflows/i18n.yml151Sources: `.github/workflows/i18n.yml14-61 `apps/docs/i18n.lock1-31 `apps/docs/package.json8-10
The documentation UI is built with Next.js 16 and uses dynamic routing to serve localized content.
The documentation supports the following locales, as evidenced by the directory structure in apps/docs/content/docs/:
| Language | Code | Path Example |
|---|---|---|
| English | en | /docs/en/triggers/index.mdx |
| Spanish | es | /docs/es/triggers/index.mdx |
| French | fr | /docs/fr/triggers/index.mdx |
| German | de | /docs/de/triggers/index.mdx |
| Japanese | ja | /docs/ja/triggers/index.mdx |
| Chinese | zh | /docs/zh/triggers/index.mdx |
Sources: `apps/docs/content/docs/ja/triggers/index.mdx1-5 `apps/docs/content/docs/fr/execution/costs.mdx1-5
The following diagram maps UI components and build scripts to the internationalization logic.
Sources: `apps/docs/package.json24-27 `apps/docs/next.config.ts1-20 `apps/docs/i18n.lock1-10
i18n.lock)The i18n.lock file is critical for maintaining translation state and avoiding redundant API calls. It maps English source content to its translated counterparts using granular checksums.
content/0, content/1) to allow partial updates of a page without re-translating the entire document `apps/docs/i18n.lock6-15title and description `apps/docs/i18n.lock4-5Sources: `apps/docs/i18n.lock1-31
The i18n workflow calculates and reports coverage to ensure parity between English source files and translated versions.
The workflow counts MDX files in each language directory and compares them to the English baseline using shell commands:
`.github/workflows/i18n.yml160-171
The results are posted to the GITHUB_STEP_SUMMARY, providing a table of translation status for Spanish, French, Chinese, Japanese, and German `.github/workflows/i18n.yml153-181
Sources: `.github/workflows/i18n.yml150-181
When changes are detected, the system creates a Pull Request targeting the staging branch.
| PR Attribute | Value |
|---|---|
| Branch | auto-translate/weekly-${{ github.run_id }} `.github/workflows/i18n.yml109 |
| Labels | i18n `.github/workflows/i18n.yml112 |
| Title | feat(i18n): update translations `.github/workflows/i18n.yml68 |
| Validation | Automated bun run build must pass `.github/workflows/i18n.yml151 |
The PR template includes a checklist for reviewers to verify the context of AI-generated translations and ensure that code blocks or technical terms (which should remain in English) were not incorrectly translated `.github/workflows/i18n.yml93-97
Sources: `.github/workflows/i18n.yml62-112 `.github/workflows/i18n.yml146-151
Refresh this wiki