You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you link that? I thought they vetoed translating the docs themselves, (the files in core), not the strings we use to generate them (the files here).
While we can't provide fully translated docs, we can at least translate some of the commonly used phrases (I.e. "Source Code: ", "Added in: ", etc.)
The TSC vettoed translation for the API docs. Navigation cues (and other common strings) should be translateable. Unfortunately due to the nature of API docs, these need to be purely on the client-side. In other words the "content" should not be translated, but anything that is layout/component should be translateable.
Meaning:
Static generated JSON files part of the JS bundle
React does a client-side switch (and stores translation key on a local storage)
next-intl also works that way on a client-side-only mode; But since we don't use Next.js here, we gotta use use-intl (https://www.npmjs.com/package/use-intl) which is the underlying core of next-intl
Activity
flakey5 commentedon May 26, 2025
How would these be distributed in releases? Putting them into subfolders like
https://nodejs.org/docs/latest/api/<locale>/buffer.html
?AugustinMauroy commentedon May 27, 2025
If I recall correctly, the TSC completely vetoed the translation.
avivkeller commentedon May 27, 2025
Can you link that? I thought they vetoed translating the docs themselves, (the files in core), not the strings we use to generate them (the files here).
While we can't provide fully translated docs, we can at least translate some of the commonly used phrases (I.e. "Source Code: ", "Added in: ", etc.)
AugustinMauroy commentedon May 27, 2025
cc @ovflowd
avivkeller commentedon May 28, 2025
ovflowd commentedon May 28, 2025
The TSC vettoed translation for the API docs. Navigation cues (and other common strings) should be translateable. Unfortunately due to the nature of API docs, these need to be purely on the client-side. In other words the "content" should not be translated, but anything that is layout/component should be translateable.
Meaning:
use-intl
(https://www.npmjs.com/package/use-intl) which is the underlying core ofnext-intl
flakey5 commentedon May 29, 2025
Just confirming- we can do this on the client side w/o requiring js to run in the client's browser, correct?
ovflowd commentedon May 29, 2025
wdym? React is client side JavaScript running on the Client-Side browser.
flakey5 commentedon May 29, 2025
Re nodejs/node#52343 (comment)
ovflowd commentedon May 29, 2025
Ah yes, then it just goes to English :)
8 remaining items