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 the
      Project view
      pane, 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
      , and entering:
      • USLocaleButton
      • PLLocaleButton
  2. Configure the English locale button:
    1. In the
      Project view
      pane, select
      USLocaleButton
      .
    2. In the
      Properties
      pane, set the
      Text
      property value to
      English
      .
    3. In the
      Events
      pane, next to
      MouseClick event
      select
      Add
      and select
      Commands
      Variable commands
      Set variable value
      .
    4. Under
      Input arguments
      , create a dynamic link between the
      VariableToModify
      property and
      Aliases
      {Session}
      Session
      ActualLanguages@NodeId
      .
      MANCIA: 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 the
      Value
      property value to
      en-US
      .
  3. Configure the Polish locale button:
    1. In the
      Project view
      pane, select
      PLLocaleButton
      .
    2. In the
      Properties
      pane, set the
      Text
      property value to
      Polish
      .
    3. In the
      Events
      pane, next to
      MouseClick event
      select
      Add
      and select
      Commands
      Variable commands
      Set variable value
      .
    4. Under
      Input arguments
      , create a dynamic link between the
      VariableToModify
      property and
      Aliases
      {Session}
      Session
      ActualLanguages@NodeId
      .
      MANCIA: 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 the
      Value
      property value to
      pl-PL
      .
Fornire un feedback
Hai domande o feedback su questa documentazione? invia il tuo feedback qui.