Sets the locale associated with the map execution context.
Syntax
void setLocale(Locale newLocale)
Parameters
Return values
None.
Exceptions
None.
Notes
This method must be run on the map variable of MapExeContext type, which is named cwMapCtx when generated by the system, or which you name when calling a map in an environment that does not automatically generate map code (such as within a collaboration).
The locale of the business object produced by a map is affected by the local of the map's execution context. If you change the locale of the map execution context as part of the map's logic, therefore, the new locale is copied to the business object. This is done when the user-modifiable logic is finished executing (that is, when the transformations visible in the diagram of the Map Designer Express are finished). You can use this API to change the business object to a different locale than the one it had when it entered the map.
Examples
The code below defines a new Locale object, sets the map execution context to that new Locale value, and then reports the map execution context locale:
Locale newLocale = new Locale("ja", "JP"); cwMapCtx.setLocale(newLocale); trace(3, "THE MAP LOCALE IS NOW: " + cwMapCtx.getLocale().toString());
See also