Tresjs / tres

Declarative ThreeJS using Vue Components
https://tresjs.org
MIT License
2.27k stars 107 forks source link

Add i18n to Tresjs documentation #123

Closed JaimeTorrealba closed 9 months ago

JaimeTorrealba commented 1 year ago

description

To expand the project, it will be necessary to add translations in different languages, for this we need to create the base. Currently there are intentions to add Spanish and Chinese.

To discuss

We have several strategies to achieve this goal, but here I will expose two of them.

1. Using the current feature provide by vitepress (check it out)[https://vitepress.vuejs.org/guide/i18n]

  1. We need to make the redirection manually (explained in the link) through netlify
  2. We need to reorganize the folder structure of the Docs
  3. Vitepress will make the rest for us
  4. Currently I have found no projects using this feature

2. Using the I18n plugin

  1. We need to install and setup the library
  2. We don't need to update folders but we'll need to update the content, with the current JSON
  3. We need to create the navbar options manually 4 Be aware of diferent formats like plurals, dates etc. 5 Implies more work to do, but it is a tested solution
Randysheng commented 1 year ago

I am curious 🤔 why not create a separate translation base like docs-cn? Vue/Vite/Vitest all do this.

JaimeTorrealba commented 1 year ago

Hi @Randysheng that's another good solution, we need just choose and implement it

Randysheng commented 1 year ago

Hi @JaimeTorrealba, I finished a first draft of a Chinese.

I made some changes. refer to VueRouter docs. I have submitted the code. If you have time, please take a look.

And I’m going to continue to transform Chinese translation to make it better.

JaimeTorrealba commented 1 year ago

Thanks @Randysheng I will continue with Spanish translation, then we deside the best strategy to do this