zhu.jun Posted November 4, 2019 Share Posted November 4, 2019 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
zhu.jun Posted November 4, 2019 Author Share Posted November 4, 2019 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
morbid Posted November 5, 2019 Share Posted November 5, 2019 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. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
victor.dong Posted November 7, 2019 Share Posted November 7, 2019 Besides , please make sure your character is support by UTF-8 or unicode. Link to comment
zhu.jun Posted December 26, 2019 Author Share Posted December 26, 2019 On 2019/11/5 at PM4点02分, morbid said: 朱你好 请不要创建类似的主题。 您可以使用自定义字体输出中文符号: 目前,我们仅支持TTF文件。在上面的示例中,文件直接放置在数据文件夹中。 谢谢。 Please send me a TTF in Chinese.I tried a lot and didn't show it. Link to comment
morbid Posted December 27, 2019 Share Posted December 27, 2019 You can find some here: https://fonts.google.com/ And make sure you're using UTF-8. ZCOOL_XiaoWei.zip How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Recommended Posts