当前位置:网站首页>Unity软件中UGUI和NGUI的多语言开发
Unity软件中UGUI和NGUI的多语言开发
2022-07-31 05:18:00 【叶大锅】
**
Unity软件中UGUI和NGUI的多语言开发
**
其中NGUI自带语言切换组件,实现动态切换多语言。
而UGUI类似NGUI,通过脚本访问固定的语言.txt。文本排列类似与表格。
UGUI两种解决方案
第一种比较笨的方法是手动的把相应文字替换掉.
第二种就是把需要切换的语言集中存放到txt文档中,通过list集合,的方法进行访问(每一个key可以对应多个value). 目标:实现中文/英文的切换.
NGUI一种解决方案
NGUI自带本地化系统支持所有UILabel文本语言切换。
1.为一个Sprite添加LanguageSelection控件,会自动变成一个PopupList组件。
2.
3.为需要语言切换的UILabel添加UILocalize组件。
4.
5.Localization.txt文件设置 路径为:Assets/NGUI/Examples/Resources/
6.
7.设置好KEY,和下面对应的文本。
8.完成,动态点击中英文切换。
目前来说NGUI自带的本地化多语言在项目中能够完好执行,能够自由切换各种写定的语言,但是在通过事件判断的多文本下却不适合。
举个例子:网络登录/密码错误/网络失败等多种状态的文本显示上就不能随机的变化,转化为其他语言。
边栏推荐
- DingTalk H5 micro-app login authentication
- Data Preprocessing, Feature Engineering, and Feature Learning - Excerpt
- box-shadow related properties
- 四种常见的POST提交数据方式
- Picture-in-Picture API in the browser
- opencv之图像二值化处理
- 词向量——demo
- Redis-Hash
- Software Testing Interview Questions 2021
- Cholesterol-PEG-Acid CLS-PEG-COOH 胆固醇-聚乙二醇-羧基修饰肽类化合物
猜你喜欢

DSPE-PEG-Thiol DSPE-PEG-SH phospholipid-polyethylene glycol-thiol liposome for later use

Embedding cutting-edge understanding

链表理论基础

The content of the wangeditor editor is transferred to the background server for storage

会话和饼干,令牌

力扣151. 颠倒字符串中的单词

Getting Started with MySQL: The Case Statement Works Well

Remote file xxx is mapped to the local path xxx and can‘t be found. You can continue debugging....

C语言对文件的操作(完整版)

2021-09-30
随机推荐
IDEA overview and installation and debugging
CAS:1403744-37-5 DSPE-PEG-FA 科研实验用磷脂-聚乙二醇-叶酸
评估机器学习模型-摘抄
ImportError: cannot import name 'Xxxx' from partially initialized module 'xx.xx.xx'
WIN10,配置adb环境
wangeditor编辑器内容传至后台服务器存储
数据分析之SQL面试真题
TCP与UDP协议的区别,以及TCP的三次握手和四次挥手
Pytorch study notes 13 - Basic_RNN
Remote file xxx is mapped to the local path xxx and can't be found. You can continue debugging....
浏览器中的画中画(Picture-in-Picture)API
mPEG-DMPE 甲氧基-聚乙二醇-双肉豆蔻磷脂酰乙醇胺用于形成隐形脂质体
Pytorch学习笔记13——Basic_RNN
会话和饼干,令牌
虚拟机查看端口号进程
PyTorch Study Notes 08 - Loading Datasets
Picture-in-Picture API in the browser
DSPE-PEG-Azide DSPE-PED-N3 Phospholipid-Polyethylene Glycol-Azide Lipid PFG
四种常见的POST提交数据方式
MW: 3400 4-Arm PEG-DSPE four-arm-polyethylene glycol-phospholipid a saturated 18-carbon phospholipid