MyLocalization Decument
  • v1.3
    • MyLocalization English Document
      • MyLocalization Data Flow Diagram
      • Quick Start
        • Run the Demo Correctly
        • Preparation
        • Localize Text
        • Localize Texture
        • Localization of Other Types of Resources
      • Load Assets
        • Only Load Resources Corresponding to the Current Language
        • Implement IResLoader interface
        • Enable IResLoader Subclass
        • Convert Resource References Associations to Paths
        • Text Localization Items Do Not Need to Be Loaded with Language Type
      • Edit Text for Localization
        • Basic Operation
        • Automatic Translation
        • Find and Replace
        • Speech Binding Text
        • CSV Table Export and Import
        • Essay on the Importance of Text Table (StringTable)
      • Display and Setter Components
        • Correspondence between Setter Components and Display Components
        • RTL (Right To Left) Related Settings
        • Dynamic Splicing of Localized Text
        • Quickly create and modify localized field text using properties of MyString
    • MyLocalization 中文文档
      • MyLocalization 数据流程图
      • 快速开始
        • 正确运行 Demo
        • 准备工作
        • 文本本地化
        • 图片本地化
        • 其他资源的本地化
      • 加载当前语言资源
        • 只加载当前语言对应的资源
        • 实现 IResLoader 接口
        • 启用 IResLoader 子类
        • 将资源引用关联转为路径
        • 文本的本地化项不能随语言类型加载
      • 编辑文本表
        • 基本操作
        • 自动翻译
        • 搜索与替换
        • 语音绑定文字
        • CSV表格导出与导入
        • 使用 MyString 的属性快速创建和修改本地化字段文本
      • 一切准备都为了Setter组件实现本地化
        • Setter 组件与显示组件的对应关系
        • RTL (Right To Left)相关设置
        • 动态拼接本地化文本
Powered by GitBook
On this page
  1. v1.3
  2. MyLocalization English Document
  3. Quick Start

Localize Texture

PreviousLocalize TextNextLocalization of Other Types of Resources

Last updated 2 years ago

Go to the LocalizationSetting component in your current scene, look at the Texture TAB under the localization container and find the localization items list below. If it doesn't have a + button on the right, You need to click on the list of localized items or the right arrow. As shown below:

Click the + button to create a new localization item TextureLeaf. Name the new TextureLeaf: 'TestTextureField1' and drag in the image resources for each language:

Create a new Ugui RawImage object, attach the Setter component: TextureLeafSetter to it, and select the localization item TextureLeaf TestTextureField1 from the localization item property drop-down menu.

Click the button on the TextureLeafSetter component: Set to the display component or switch languages to test the display. If it works as expected, the localization was successful.

Note: We did not set the image corresponding to the Arabic language, but when switching the language test, the current language will be changed to Arabic, and then the image displayed in RawImage is corresponding to the simplified Chinese image. This is not an error, but because when the Setter cannot find the resource corresponding to the current language, The image corresponding to the default language type is fetched, because the default language type set in the current LocalizationSetting is Simplified Chinese. When you change the default language to English and switch to Arabic, the Setter component will find the image resource in English.

Note: When we use a localization item in the Setter component, the field name of the localization item is automatically locked. The field name of the localization item is automatically locked to indicate that the localization item may be in use. Please do not change the field name. There are also two cases where the field name is locked when the field is not referenced:

All game objects that are using this localization item are deleted, and the name of this field does not automatically release the lock state.

Click the lock icon to manually lock the name of the newly created localization item.