Multilingual support
gaowanliang opened this issue · 5 comments
I tried to sinicize the game in Chinese, but I noticed that these texts are fixed in the code. If you make changes, I have to find the location of the text again and make changes. Considering that the amount of text is not large now, is it necessary to find a special file to save string data for multilingual support.
Good ideas!
You can go here to check my Chinese version, but if you want to make Chinese version, you need to change the display of some words, such as "Ready" in Chinese, which corresponds to "准备" or "已准备". Using "准备" alone generally has certain ambiguity, so I use "已准备". But if you use "已准备", the text display will be very strange.
This is because the text size you set here is 1.5em (as if, I forgot),you need to adjust the font size to 0.8em, and at the same time, you need to split "已" and "准备" with "<br />",and also need to adjust the percentage of absolute positioning "top" value.
For example, a sentence in English may be in order to be smooth in Chinese , need two or more sentences. But it's easy to solve. I'm preparing for the exam recently, and I didn't look at your code carefully. If necessary, I can participate in some work.
PS:One of them is translated as "中文汉化由高玩梁制作". This sentence does not correspond to the original sentence. This sentence means that this Chinese version is provided by me (/▽\). There is also this sentence: "如果对手中途离开,TA的方块会卡住,回来了就会继续,你可以通过这个来确定要不要继续和TA玩", which is to show that the shadow of the opponent will stagnate when he is offline.I hope you can pay attention to it. The other sentences basically correspond to the original one by one.
You can go here to check my Chinese version
Very nice, do you also have a live demo deployed somewhere?
This is because the text size you set here is 1.5em (as if, I forgot),you need to adjust the font size to 0.8em
I see. It makes sense, because the English texts I chose are meant to fit the design perfectly. But this thinking doesn't scale easily to multiple language. Given that Flatris has limited text, however, I think we can design a language map where we define the value and font size for each text label. This way we continue to fit the texts very nicely in the design. Not sure if the font size should be defined for each text label, or globally for a language.
which is to show that the shadow of the opponent will stagnate when he is offline.I hope you can pay attention to it
Yeah this is a good idea but a separate issue. To simplify we should split this issue into two and handle them separately.
I've divided the issue into two parts.
For the Chinese version of the online demo, you can see it here
Hehe, I don't know Chinese but the homepage looks cooler than the English one! 😆