Regional Settings Class Properties

This section describes the regional settings class properties. The properties are discussed in alphabetical order.

Description

This property specifies the client time zone. This property takes a string value.

This property is read-write.

Description

This property specifies how currency values are displayed. This property takes a number value. The default value is 1.

In the following values, @ represents the character specified with the CurrencySymbol property.

Value

Description

0

@1.1

1

1.1@

2

@.1.1

3

1.1.@

This property is read-write.

Description

This property specifies the currency symbol. This property takes a string value. The default value is "$".

This property is read-write.

Description

This property specifies the date format defaults. PeopleTools supports the Short Date Format specification (MDY, DMY, or YMD), and the Date separator setting. When you add a Date field in a record definition, you indicate whether you want to display the century. PeopleTools Date and DateTime fields always show leading zeros for month, day, and year.

This property takes a number value. The values for this property are:

Value

Description

0

MDY (default)

1

DMY

2

YMD

3

Default value on system

This property is read-write.

Description

This property specifies the character used to separate the month, day, year in the date. This property takes a string value. The default value is "/".

This property is read-write.

Description

This property specifies the character used to separate the fractional of the number from the whole. This property takes a string value. The default value for this property is ".".

Note: If you change the value of this property to a comma (,), you should adjust the DigitGroupingSymbol to a different character or some applications may not operate correctly.

This property is read-write.

Description

This property specifies the character used as a thousand or other grouping separator. This property takes a string value. The default value for this property is ",".

This property is read-write.

Description

This property specifies the language to be used for the transaction. This property takes a string value. The default value for this property is the user’s base language.

This property is read-write.

Note: If you change this value dynamically using PeopleCode, this value will not change back to the original value when you disconnect. You must manually set it back to the original value.

Example

The following example sets the language code, then at the end of the program, sets it back to the original value.

Local ApiObject &SESSION;
Local ApiObject &CI;
 
/** Get Session ApiObject **/
&SESSION = %Session;

/** Get Message ApiObject **/
&MSG = %IntBroker.GetMessage();
&RS = &MSG.GetRowset();

/** Get Component Interface **/
&CI = &SESSION.GetCompIntfc(compIntfc.NAMES_CI);

&REG_LNG = &SESSION.RegionalSettings.LanguageCd;

For &TRANS_NUM = 1 To &RS.RowCount

/** Store Language Code in Temp Var **/
&LNG = &RS(&TRANS_NUM).PSCAMA.LANGUAGE_CD.Value;

/** Set the Language for this Transaction **/
If &LNG <> &REG_LNG Then 
&SESSION.RegionalSettings.LanguageCd = &LNG;
End-If;
/* application specific processing */

&SESSION.RegionalSettings.LanguageCd = &REG_LNG;
&SESSION.Disconnect();
End-For

Description

This property specifies whether the local time zone of the client should be used to format time fields. This property takes a Boolean value. The default value is True.

This property is read-write.

Description

This property specifies the morning designator. This property takes a string value up to five characters. The default value is AM.

Use the 2359Separator property to specify the afternoon designator.

This property is read-write.

Considerations Using the 1159Separator Property

You cannot use this property as you would other properties. You must use the ObjectGetProperty function for accessing the property. For example:

Local ApiObject &SESSION;
Local ApiObject &reg;

/** Get Session ApiObject **/
&SESSION = %Session;
&reg = &SESSION.RegionalSettings;

&REG_LNG = &SESSION.RegionalSettings.LanguageCd;
&MornDesigination = ObjectGetProperty(&reg, "1159Separator");

Description

This property specifies the afternoon designator. This property takes a string value up to five characters. The default value is PM.

Use the 1159Separator property to specify the morning designator.

This property is read-write.

Considerations Using the 2359Separator Property

You cannot use this property as you would other properties. You must use the ObjectGetProperty function for accessing the property. For example:

Local ApiObject &SESSION;
Local ApiObject &reg;

/** Get Session ApiObject **/
&SESSION = %Session;
&reg = &SESSION.RegionalSettings;

&REG_LNG = &SESSION.RegionalSettings.LanguageCd;
&AfternoonDesigination = ObjectGetProperty(&reg, "2359Separator");