GetLocaleInfo
Retrieves a struct containin info on a locale, with an optional display locale
Method Signature
GetLocaleInfo(locale=[string], dspLocale=[string])
Arguments
Argument
Type
Required
Description
Default
locale
string
false
Optional locale to retrieve information on - either a common format ( "German" ), or an ISO Directive
dspLocale
string
false
Optional display language locale
Examples
Get information about the page's locale
getLocaleInfo();
Result: { country : "US", iso : { country : "USA", language : "eng" }, display : { country : "United States", language : "English" }, language : "en", name : "English (United States)", variant : "" }
Output page's locale in a divergent language
Outputs the language locale of the page in German.
getLocaleInfo( dspLocale="German" ).DISPLAY.LANGUAGE;
Result: Englisch
Output German locale in a page's language
Outputs the German locale in the language defined for the page.
getLocaleInfo( locale="de-DE", dspLocale=getLocaleDisplayName() ).DISPLAY.COUNTRY;
Result: Germany
Additional Examples
dump( GetLocaleInfo() );
Related
Last updated
Was this helpful?