U3D dialogue task plug-in Dialogue System for Unity research (4)

This article is about Localization multilingual localization, if you only make Chinese games, don't read it.

1. Switch language.

It should be noted that the plug-in itself only has the default "default", "cn" and "en" which need to be created by ourselves, which will be written later.

1. Set in the code.

using UnityEngine;
using PixelCrushers.DialogueSystem;

public class UseLua : MonoBehaviour
{
    void Start()
    {    
        //设置中文
        DialogueManager.SetLanguage("cn");
        //设置英文
        DialogueManager.SetLanguage("en");
        //设置默认
        DialogueManager.SetLanguage("default");
    }
}

2. Set in the component.

After filling in the language, you need to click the reset button below, otherwise you will not be able to switch, if you do not fill in the language, the default language will be used, or you can check to use the current system language.

By default, if a language has a blank field value, the default language's field value will be used at runtime. To use a blank field value for the language instead of the default language,

TextTable.useDefaultLanguageForBlankTranslations is set to false.

 

Supongo que te gusta

Origin blog.csdn.net/u012322710/article/details/127023492
Recomendado
Clasificación