Documentation index for AI agents (llms.txt) A Markdown version of every page is available: request the page's source under /docs/, follow the "alternate" link in this page's head, or start from /llms.txt.
Game Creator 3 logo Dialogue

Change Language#

Game Creator / Dialogue / Localization / Change Language

Description#

Changes the current Language of the Dialogue system

Note

Attempting to change the language ID to an invalid one will result in an error thrown

Parameters#

Name Description
Locale ID The identifier of the Locale that matches the ones from the Settings

Code#

using System;
using UnityEngine;
using VisualScript.Icons;
using VisualScript.Runtime;

namespace GameCreator.Runtime.Dialogue
{
    [Title("Change Language")]
    [Image(typeof(IconLocalization), ColorTheme.Type.Blue)]

    [Description("Changes the current Language of the Dialogue system")]
    [Category("Game Creator/Dialogue/Localization/Change Language")]

    [Parameter("Locale ID", "The identifier of the Locale that matches the ones from the Settings")]

    [Keywords("Locale", "Language", "Localize", "Localization", "Idiom")]

    [Note("Attempting to change the language ID to an invalid one will result in an error thrown")]

    [Serializable]
    public class InstructionDialogueChangeLanguage : Instruction
    {
        [SerializeField] private GetString m_Locale = new GetString("en");

        protected override string GetTitle(GameObject source) => $"Language = {this.m_Locale}";

        protected override Awaitable Run(Args args)
        {
            string locale = this.m_Locale.Get(args);
            LocalizationManager.SetCurrentId(locale);

            return Done;
        }
    }
}
Game Creator 3 logoGame Creator 3 © Catsoft Works 2026. All rights reserved.