GetLocale
Retrieves the the string representation of the current locale
Method Signature
GetLocale()
Arguments
This function does not accept any arguments
Examples
Output current Locale than set it to swiss locale
writeOutput( getlocale() );
writeOutput( " → " );
setLocale( "de_ch" );
writeOutput( getlocale() );
Result: english (us) → german (swiss)
Additional Examples
var n = 1234.56;
writeOutput( getlocale() );
dump( dateTimeFormat( now() ) );
dump( LSdateTimeFormat( now() ) );
dump( numberFormat( n ) );
dump( LSnumberFormat( n ) );
writeOutput( " To " );
setLocale( "french(switzerland)" );
writeOutput( getlocale() );
dump( dateTimeFormat( now() ) );
dump( LSdateTimeFormat( now() ) );
dump( numberFormat( n ) );
dump( LSnumberFormat( n ) );
writeOutput( " To " );
setLocale( "German" );
writeOutput( getlocale() );
dump( dateTimeFormat( now() ) );
dump( LSdateTimeFormat( now() ) );
dump( numberFormat( n ) );
dump( LSnumberFormat( n ) );
Related
Last updated
Was this helpful?