Language Info


Node Information
Gets language information.
General Information
• This node doesn't have other available options.
Visual
Visual

Ports
Text Type DataType Accepts IsList CustomAcception
Language IN CultureInfo ONE FALSE FALSE
Name OUT String MULTIPLE FALSE FALSE
DisplayName OUT String MULTIPLE FALSE FALSE
EnglishName OUT String MULTIPLE FALSE FALSE
NativeName OUT String MULTIPLE FALSE FALSE
IsNeutralCulture OUT Boolean MULTIPLE FALSE FALSE
KeyboardLayoutId OUT Int32 MULTIPLE FALSE FALSE
LCID OUT Int32 MULTIPLE FALSE FALSE
Parent OUT CultureInfo MULTIPLE FALSE FALSE

Source
namespace Korduene.KGraph.Nodes.Globalizer
{
    [IsNode("Language Info")]
    public class LanguageInfo : Node
    {
        Port lang = new Port(PortType.IN, typeof(System.Globalization.CultureInfo), AcceptsLinks.ONE, "Language");
        Port name = new Port(PortType.OUT, typeof(string), AcceptsLinks.MULTIPLE, "Name");
        Port displayname = new Port(PortType.OUT, typeof(string), AcceptsLinks.MULTIPLE, "DisplayName");
        Port engname = new Port(PortType.OUT, typeof(string), AcceptsLinks.MULTIPLE, "EnglishName");
        Port nativename = new Port(PortType.OUT, typeof(string), AcceptsLinks.MULTIPLE, "NativeName");
        Port isnatural = new Port(PortType.OUT, typeof(bool), AcceptsLinks.MULTIPLE, "IsNeutralCulture");
        Port keyboardid = new Port(PortType.OUT, typeof(int), AcceptsLinks.MULTIPLE, "KeyboardLayoutId");
        Port lcid = new Port(PortType.OUT, typeof(int), AcceptsLinks.MULTIPLE, "LCID");
        Port par = new Port(PortType.OUT, typeof(System.Globalization.CultureInfo), AcceptsLinks.MULTIPLE, "Parent");
        public LanguageInfo()
        {
            Name = "Language Info";
            AddPort(lang);
            AddPort(name);
            AddPort(displayname);
            AddPort(engname);
            AddPort(nativename);
            AddPort(isnatural);
            AddPort(keyboardid);
            AddPort(lcid);
            AddPort(par);
            Information = "Gets language information.";
        }
        public override void UpdateResults()
        {
            string c = GetValue(lang);
            displayname.Instructions = c + ".DisplayName";
            engname.Instructions = c + ".EnglishName";
            isnatural.Instructions = c + ".IsNeutralCulture";
            keyboardid.Instructions = c + ".KeyboardLayoutId";
            lcid.Instructions = c + ".LCID";
            name.Instructions = c + ".Name";
            nativename.Instructions = c + ".NativeName";
            par.Instructions = c + ".Parent";
        }
    }
}