Documentation

Edit Translations

Find the text on a page, update both languages, and check language switching

The project includes English and Chinese. English pages use /, /chat, and /docs; Chinese pages use /zh, /zh/chat, and /zh/docs.

1. Find the Text

The easiest way is to search your editor for the words shown on the page. Interface text lives in src/i18n/:

Content to changeLocation
Homepage, navigation, and footersrc/i18n/landing.content.ts
Login and signupsrc/i18n/auth/
Chat, model picker, image and video generationsrc/i18n/generate/
Plan names and featuressrc/i18n/pricing/
User dashboard, admin, and shared messagessrc/i18n/dashboard/, admin/, common/

Apart from the homepage, each directory usually has en.json and zh.json. Change text values while keeping field names, key, and locale intact.

2. Update Both Languages

For example, find the existing "Please login first" message in src/i18n/common/en.json and replace it with your wording. Update the matching text in zh.json too.

Homepage fields contain both languages together:

An existing field in src/i18n/landing.content.ts
title: t({
  en: "Your product title",
  zh: "你的产品标题",
}),

Save and refresh both language pages. If a new content file is not picked up, restart pnpm dev.

3. Translate Docs and Articles

Content pages use matching filenames, for example:

content/docs/my-guide.mdx      → /docs/my-guide
content/docs/my-guide.zh.mdx   → /zh/docs/my-guide

Translate the title, description, and body, keeping the base filename the same. Chinese documentation navigation labels go in meta.zh.json, with page identifiers and order matching meta.json.

Internal links in Chinese content need /zh, such as [Quick Start](/zh/docs/introduction/quick-start). See Publish Documentation and Write a Blog Post for complete examples.

4. Check Language Switching

Open the updated page and switch between languages. Check the text, buttons, and navigation, then follow internal links to confirm they keep the selected language.

Ask Your AI Tool

Change [current wording] to [new wording] in the existing English and
Chinese dictionaries. Keep field names, key, and locale intact. Update
related docs or articles if needed, using /zh paths for internal links
in Chinese content. Check the pages and buttons in both languages.

To add a third language, ask your AI tool to update language settings, routing, and all translations together, then check page switching. Adding one translation file does not give the whole website support for a new language.

On this page