当前位置:网站首页>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自带的本地化多语言在项目中能够完好执行,能够自由切换各种写定的语言,但是在通过事件判断的多文本下却不适合。
举个例子:网络登录/密码错误/网络失败等多种状态的文本显示上就不能随机的变化,转化为其他语言。
边栏推荐
- Data Preprocessing, Feature Engineering, and Feature Learning - Excerpt
- 2022年SQL大厂高频实战面试题(详细解析)
- mPEG-DSPE 178744-28-0 Methoxy-polyethylene glycol-phosphatidylethanolamine linear PEG phospholipids
- Picture-in-Picture API in the browser
- Tensorflow——演示
- MySQL free installation download and configuration tutorial
- 词向量——demo
- The content of the wangeditor editor is transferred to the background server for storage
- Phospholipids-Polyethylene Glycol-Active Esters for Scientific Research DSPE-PEG-NHS CAS: 1445723-73-8
- 解决background-size:cover时图片铺满但显示不完整?
猜你喜欢

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

Image binarization processing of opencv

map和set

Pytorch Daily Practice - Predicting Surviving Passengers on the Titanic

The solution to the IDEA console not being able to enter information

Cholesterol-PEG-DBCO 胆固醇-聚乙二醇-二苯基环辛炔化学试剂

科研试剂Cholesterol-PEG-Maleimide,CLS-PEG-MAL,胆固醇-聚乙二醇-马来酰亚胺

日志jar包冲突,及其解决方法

Wangeditor rich text editor to upload pictures and solve cross-domain problems

螺旋矩阵Ⅱ
随机推荐
力扣刷题.快乐数
MW:3400 4-Arm PEG-DSPE 四臂-聚乙二醇-磷脂一种饱和的18碳磷脂
MW: 3400 4-Arm PEG-DSPE four-arm-polyethylene glycol-phospholipid a saturated 18-carbon phospholipid
实现离线文件推流成rtsp 2
力扣.三数之和/四数之和
Research reagents Cholesterol-PEG-Maleimide, CLS-PEG-MAL, Cholesterol-PEG-Maleimide
应用usb_cam同时打开多个摄像头方法
虚拟机查看端口号进程
2021-09-30
Virtual machine view port number process
会话和饼干,令牌
mPEG-DMPE Methoxy-polyethylene glycol-bismyristyl phosphatidylethanolamine for stealth liposome formation
Redis-哈希
化学试剂磷脂-聚乙二醇-氨基,DSPE-PEG-amine,CAS:474922-26-4
mobaxterm 编码问题解决
力扣.找到打字符串中所有字母异位词
Cholesterol-PEG-Acid CLS-PEG-COOH 胆固醇-聚乙二醇-羧基修饰肽类化合物
IDEA overview and installation and debugging
MySQL 入门:Case 语句很好用
IDEA控制台不能输入信息的解决方法