Jump to content

如何汉化通过C++代码创建的UI界面


photo

Recommended Posts

Localization of the UI language in the official document is done by reading the UI interface created by the UI file.

Then I would like to ask through C++ code to create the UI interface control how to language Chinese?

Any examples?

Link to comment

The localization of the UI language in the official document is accomplished by loading the UI interface created by the UI file.

Only controls written in UI files can be localized in that way.

The control for C++ code WidgetXXXptr creat cannot be localized.

Then I would like to ask through the c++ code to create UI interface control how to achieve the Chinese language?

Any examples?

Link to comment

Hello Zhu,

Please do not create similar topics.

You can output Chinese symbols with custom font: 

Gui::get()->setFont("your_font_with_chinese_symbols.ttf");

At the moment we support only TTF files. In the example above file is placed directly in the data folder.

Thank you.

image.png

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment
  • 1 month later...
On 2019/11/5 at PM4点02分, morbid said:

朱你好

请不要创建类似的主题。

您可以使用自定义字体输出中文符号: 


目前,我们仅支持TTF文件。在上面的示例中,文件直接放置在数据文件夹中。

谢谢。

image.png

Please send me a TTF in Chinese.I tried a lot and didn't show it.

Link to comment
  • 5 months later...
×
×
  • Create New...