Create buttons for switching locales

Create a button that changes the interface language to English and a button that changes the interface language to Polish.
  1. Create the buttons:
    1. In
      Project view
      , create two buttons by right-clicking
      MainWindow (type)
      and selecting
      New
      Base controls
      Button
      .
    2. Rename the buttons by hovering-over each button, selecting
      Edit
      Edit
      , and entering:
      • USLocaleButton
      • PLLocaleButton
  2. Configure the English locale button:
    1. In
      Project view
      , select
      USLocaleButton
      .
    2. In
      Properties
      , set
      Text
      to
      English
      .
    3. In
      Events
      , next to
      MouseClick event
      select
      Add
      Add
      and select
      Commands
      Variable commands
      Set variable value
      .
    4. Under
      Input arguments
      , create a dynamic link between
      VariableToModify
      and
      Aliases
      {Session}
      Session
      ActualLanguages@NodeId
      .
      TIP: You can select the
      @Attribute
      values from the
      Attribute
      drop-down menu at the bottom of the dialog.
      For more information about dynamic links, see Create dynamic links.
    5. Under
      Input arguments
      , set
      Value
      to
      en-US
      .
  3. Configure the Polish locale button:
    1. In
      Project view
      , select
      PLLocaleButton
      .
    2. In
      Properties
      , set the
      Text
      property value to
      Polish
      .
    3. In
      Events
      , next to
      MouseClick event
      select
      Add
      Add
      and select
      Commands
      Variable commands
      Set variable value
      .
    4. Under
      Input arguments
      , create a dynamic link between
      VariableToModify
      and
      Aliases
      {Session}
      Session
      ActualLanguages@NodeId
      .
      TIP: You can select the
      @Attribute
      values from the
      Attribute
      drop-down menu at the bottom of the dialog.
      For more information about dynamic links, see Create dynamic links.
    5. Under
      Input arguments
      , set
      Value
      to
      pl-PL
      .
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.