Series 5 Basic Class - Self-Paced Modules
Locales
What are locales?
Setting the locale of a document allows us to automatically control various international standards such as monetary values, etc. We can set a locale as an action in the logic map, thereby automatically modifying our document for different nationalities.
- Create a new, blank publication.
- Click in the document. You should see the blinking cursor at the top left of the page.
We are going to create a variable with the currency value, and fill it with a numeric value. We will then place it on the page and notice how the monetary symbol changes as we change the current locale.
Creating and Setting a Variable
- From the main menu, select Insert / Set Variable...
- Click New.
- In the Name box, type Currency Value.
- In the Type pulldown, select Currency.
- Click Create.
The Set Variable box is exposed.
- In the Label text box, type Locale Demo Value.
- Click the Value value picker, and select Constant / Number.
- In the Value box, type 123.45.
- Click Create.
Now let's place the variable value on the page.
- Click in the document. You should see a blinking cursor at the top left.
- From the main menu, select Insert / Field / Variable.
- Select the Currency Value variable by ensuring that the blue box to the left is colored in.
- Click Create.
Setting the Locale
Now let's set the locale.
- In the logic tree, click just above Action (Locale Demo Value).
- From the main menu, select Insert / Control Objects / Action...
- In the Label box, type Set Locale.
- In the Action box, select Change locale.
- Click on the folder to the right of Locale.
- Choose English (United Kingdom).
- Click Create.
Note how the pound sign now automatically appears in front of the value.