GetLocale()

Gets the current geographic/language locale value.

To set the default display format of date, time, number, and currency values in a CFML application session, you use the SetLocale() function.

GetLocale( );

Returns: String

This function does not take any arguments.

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 ) );

See also