Skip to content

Push_Locale

Include: Use System\Locale.pkg

See Also: Pop_Locale, Set_Locale, Get_Locale, Locale attributes

Purpose

Saves the active locale settings for a scoped change.

Syntax

Push_Locale

Arguments

None.

Returns

None.

Behavior

Push_Locale saves the current locale attribute values from DF_LOCALE through DF_LOCALE_INDIAN_NUMERALS so they can be restored later by Pop_Locale.

Use Push_Locale and Pop_Locale as a paired scope guard around temporary locale customizations.

Example

Use System\Locale.pkg

Procedure FormatShortDate Date dDate
    String sDate

    Push_Locale
    Set_Attribute DF_LOCALE_DATE_FORMAT to "yyyy-MM-dd"
    Move dDate to sDate
    Pop_Locale
End_Procedure