当前位置:网站首页>Multi language development of ugui and ngui in unity software

Multi language development of ugui and ngui in unity software

2020-12-06 09:07:16 osc_ p0nhs4oz

**

Unity In software UGUI and NGUI Multi language development of

**

among NGUI With language switch components , Realize dynamic switching between multiple languages .

and UGUI similar NGUI, Accessing fixed languages through scripts .txt. The arrangement of text is similar to that of a table .

UGUI Two solutions

The first stupid way is to manually replace the corresponding text .
The second is to store the languages that need to be switched to txt In the document , adopt list aggregate , Method to access ( every last key Can correspond to multiple value). The goal is : Implement Chinese / English switching .

NGUI A solution

NGUI Its own localization system supports all UILabel Text language switch .
1. For one Sprite add to LanguageSelection Control , It will automatically become a PopupList Components .
2. Insert picture description here

3. For those who need language switching UILabel add to UILocalize Components .
4. Insert picture description here

5.Localization.txt File settings Path is :Assets/NGUI/Examples/Resources/
6. Insert picture description here

7. Set it up KEY, And the corresponding text below .
8. complete , Dynamic click Chinese and English switch .

For the moment NGUI The self-contained localized multi language can be well implemented in the project , Can freely switch between various written languages , However, it is not suitable for multi text based on event judgment .

for instance : Network login / Wrong password / Network failure and other states of text display can not be random changes , Translation into other languages .

Take a look at this Zhihu post .

版权声明
本文为[osc_ p0nhs4oz]所创,转载请带上原文链接,感谢
https://chowdera.com/2020/12/202012060904111341.html