mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
Localization本地化
Localization本地化
This commit is contained in:
@@ -15,7 +15,11 @@ namespace TEngine
|
||||
protected override void Start()
|
||||
{
|
||||
base.Start();
|
||||
if (string.IsNullOrEmpty(this.text))
|
||||
if (Key > 0 && string.IsNullOrEmpty(this.text))
|
||||
{
|
||||
text = SetText(Key);
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(this.text))
|
||||
{
|
||||
Key = LocalizeMgr.Instance.GetLocalId(this.text);
|
||||
if (Key <= 0)
|
||||
|
8
Assets/TResources/Localization.meta
Normal file
8
Assets/TResources/Localization.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 24e1d45d8e9227f44ac9f92bbec62b8d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
6
Assets/TResources/Localization/Localization.json
Normal file
6
Assets/TResources/Localization/Localization.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"1": {
|
||||
"Chinese": "第一章",
|
||||
"EngLish": "第一章内容"
|
||||
}
|
||||
}
|
7
Assets/TResources/Localization/Localization.json.meta
Normal file
7
Assets/TResources/Localization/Localization.json.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6af553b847225854db57f39a45cc27bf
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
3
Assets/TResources/Localization/LocalizationId.json
Normal file
3
Assets/TResources/Localization/LocalizationId.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"CurlocalizationId": 1
|
||||
}
|
7
Assets/TResources/Localization/LocalizationId.json.meta
Normal file
7
Assets/TResources/Localization/LocalizationId.json.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4a163b44b506e7d4b8ed782a14b13dab
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user