Closed hxnan closed 6 years ago
Yeah, right now we're writing the html directly. The system didn't take translations into account 😅
We could, maybe implement something like...
<div class="en">Hello</div>
<div class="cn">您好</div>
And filter those at display time?
The <meta charset="utf-8" />
tag must be in <head>
of every file (it should already be in there).
Then some unicode-aware editor like Notepad++ using "UTF-8 without BOM" for the encoding should work quite conveniently...
Two languages or more in a html page will confuse the mainttainer in future. Create a new folder named doc.cn/ in doc/ would be better.
How about duplicating files?
docs/api/cameras/Camera.html
docs/api/cameras/CubeCamera.html
docs/api/cameras/OrthographicCamera.html
docs/api/cameras/PerspectiveCamera.html
Will become:
docs/api/cameras/Camera.html
docs/api/cameras/Camera.cn.html
docs/api/cameras/CubeCamera.html
docs/api/cameras/CubeCamera.cn.html
docs/api/cameras/OrthographicCamera.html
docs/api/cameras/OrthographicCamera.cn.html
docs/api/cameras/PerspectiveCamera.html
docs/api/cameras/PerspectiveCamera.cn.html
But that may be a bit messy... Maybe
docs/api/en/cameras/Camera.html
docs/api/en/cameras/CubeCamera.html
docs/api/en/cameras/OrthographicCamera.html
docs/api/en/cameras/PerspectiveCamera.html
docs/api/cn/cameras/Camera.html
docs/api/cn/cameras/CubeCamera.html
docs/api/cn/cameras/OrthographicCamera.html
docs/api/cn/cameras/PerspectiveCamera.html
I love the last idea . :+1: A simple but useful way.
I would like to help with the translation
The language code for Chinese is zh
BTW - CN
is the region. The whole locale for China is then called zh_CN
.
Well, thank you for pointing out, so the folder should be /docs/api/zh_CN/*
The default document is
docs/api/cameras/PerspectiveCamera.html
and the Chinese could be
docs/api/zh_CN/cameras/PerspectiveCamera.html
The rules is :
docs/api/ ( language type) /cameras/PerspectiveCamera.html
We don't need to modify the doc exits now, just add the folder of doc writed by other language.
How about this?
Well, thank you for pointing out, so the folder should be /docs/api/zn_CN/*
Wouldn't do that for documentation, unless zn_CN
(Chinese as written in China) and zn_TW
(Chinese as written in Taiwan) are incompatibly different and there is actually someone doing a translation for the Taiwanese dialect. Otherwise can just define the default for the Chinese language and call the folder zn
, just like the value of the lang
attribute in the HTML should read, which is why I mentioned it ;-). For localizing software, regions play a more important role: The Date/Time notation may differ, for instance.
Maybe we can follow wikipedia? They use zh
as sub domain. I don't think they support zn_TW
?
https://zh.wikipedia.org/wiki/Wikipedia:%E9%A6%96%E9%A1%B5
The language code for Chinese is zh call the folder zn
Which is correct?
zh is correct @WestLangley , Wiki is excellent, but the https://zh.wikipedia.org/ has been polluted by the fuvk g.o.v. these day.
I'm thinking about how the new urls should be. Probably this?
http://threejs.org/docs/en/#Reference/Core/BufferGeometry
http://threejs.org/docs/zh/#Reference/Core/BufferGeometry
Hi guys, is this still being worked on ?
I am sorry for this ,I want to do this work when I was a college student and learning the graphics. But I has got an Operation Engineer Job. So ...close this issue. @Pansaai
I read the folder of /doc and the list.js ,the category of api is writed in JSON. I want to know how the document be built. Do you write html of document directly, Or write text of docment in some software then built the folder of doc/ automatically.
I can write html, but maybe there is a easy way to do this.