Spec-Zone.ru › ColdFusion

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

  • CF
  • Lucee
  • BL 1.0.0+
  • See Also: getLocaleDisplayName GetLocaleInfo getLocaleCountry getLocaleLanguage

    Compatibility

    Lucee:

    DEPRECATED since version 5 Lucee5+ Deprecated in favor of getLocaleInfo()

    Examples
    Sample code invoking the getLocale function

    Output current Locale than set it to swiss locale

    writeOutput(getlocale());
    writeOutput(' → ');
    setLocale('de_ch');
    writeOutput(getlocale());

    Expected Result: english (us) → german (swiss)

    © 2012–present Foundeo, Inc. and the CFDocs contributors.
    Licensed under the MIT License.
    ColdFusion is a trademark of Adobe Systems Incorporated.
    https://cfdocs.org/getlocale

    Spec-Zone.ru

    Настройки Оффлайн Что нового Помощь О нас
    Spec-Zone .ru
    спецификации, руководства, описания, API