Lasso Soft Inc. > Home

[ locale_setdefault ]

Method

The [locale_setdefault] method sets the default_locale to be used for formatting.

The method takes one parameter, the locale to set the default to.

  • Syntax
locale_setdefault( locale )
Examples
  • Beginner

Change the default locale settings for locale formatted output

Use the [lasso_setdefault] method. This example shows a date output in the default format. The default locale is the set to  France and the date is re-output to show the difference.

Code

local( myDate = date )

locale_default->asString +': '+locale_default->format(#myDate)+'\n'

locale_setdefault(locale_france)

locale_default->asString +': '+locale_default->format(#myDate)+'\n'

Result

en_CA: 2011-02-12
fr_FR: 12 févr. 2011

Recent Comments

No Comments found

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft