Skip to content

Translate docs to multiple languages #540

@alvarosabu

Description

@alvarosabu

Description

As a developer using TresJS I would like to have documentation available in my native language

This ticket is meant to keep track of the progress of multiple PRs to translate Tres docs:

Feel free to comment below if you would like to add your language and help us translate the docs.,

Suggested solution

Create a branch docs/translation-<language-unicode> and a PR similar to #534 with the following steps:

  1. Add a <language-unicode>.ts inside docs/.vitepress/config ex: zh.ts (copy the en.ts which is the original and then translate only what's needed.
  2. Remember to add the code prefix route to all the links on this file, ex link: /guide/ -> link: /zh/guide
  3. Add to config to docs/.vitepress/config/index.ts like this:
export default defineConfig({
  ...sharedConfig,
  locales: {
    root: { label: 'English', lang: 'en-US', link: '/', ...enConfig },
    es: { label: 'Español', lang: 'es-ES', link: '/es/', ...esConfig },
    /* zh: { label: '简体中文', lang: 'zh-CN', link: '/zh/', ...zhConfig }, */
  },
})
  1. Create a folder with the language code (ex: zh) inside docs/, this is where the translations will live, then start translating the files using the same structure as on the docs root, like this:

docs/advanced/extending.md --> docs/zh/advanced/extending.md

Alternative

No response

Additional context

No response

Validations

Metadata

Metadata

Assignees

Labels

docsImprovements or additions to documentationdxfeaturehelp wantedExtra attention is neededp3-significantHigh-priority enhancement (priority)

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions