Create Language Menu


Node Information
Creates a language menu that will change project language when user clicks on the language menu items.
If NativeNames is set to true menu items will be in their native names, else the English name for the language will be shown.
When SetEvents is set to true, language will change when menu items are clicked, else clicking language menus will not do anything.
General Information
• This node doesn't have other available options.
Visual
Visual

Ports
Text Type DataType Accepts IsList CustomAcception
Create IN RUN MULTIPLE FALSE FALSE
Menu IN Object ONE FALSE FALSE
NativeNames IN Boolean ONE FALSE FALSE
SetEvents IN Boolean ONE FALSE FALSE

Source
namespace Korduene.KGraph.Nodes.Globalizer
{
    [IsNode("Create Language Menu")]
    public class CreateLanguageMenu : Node
    {
        Port run = new Port(PortType.IN, typeof(RUN), AcceptsLinks.MULTIPLE, "Create");
        Port nativ = new Port(PortType.IN, typeof(bool), AcceptsLinks.ONE, "NativeNames");
        Port setev = new Port(PortType.IN, typeof(bool), AcceptsLinks.ONE, "SetEvents");
        Port control = new Port(PortType.IN, typeof(object), AcceptsLinks.ONE, "Menu");
        public CreateLanguageMenu()
        {
            NodeType = KGraph.NodeType.Method;
            Name = "Create Language Menu";
            AddPort(run);
            AddPort(control);
            AddPort(nativ);
            AddPort(setev);
            setev.Value = "true";
            Information = "Creates a language menu that will change project language when user clicks on the language menu items.\r\n"
                 + "If NativeNames is set to true menu items will be in their native names, else the English name for the language will be shown.\r\n"
                 + "When SetEvents is set to true, language will change when menu items are clicked, else clicking language menus will not do anything.";
        }
        public override string Code()
        {
            return "Korduene.Globalizer.CreateLanguageMenu(" + GetValue(control) + ", " + GetValue(nativ) + ", " + GetValue(setev) + ");";
        }
    }
}