Spec-Zone.ru › ColdFusion

getLocaleDisplayName

Gets a locale value and displays the name in a manner that is appropriate to a specific locale. By default, gets the current locale in the current locale's language.

getLocaleDisplayName([locale, inLocale]) → returns string

  • CF7+
  • Lucee
  • BL 1.0.0+
  • See Also: getLocale getLocaleInfo getLocaleCountry getLocaleLanguage

    Argument Reference

    locale string

    The locale whose name you want. The default is the current ColdFusion locale, or if no ColdFusion locale has been set, the JVM locale.

    inLocale string

    The locale in which to return the name. The default is the current ColdFusion locale, or if no ColdFusion locale has been set, the JVM locale.

    Compatibility

    Lucee:

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

    Examples
    Sample code invoking the getLocaleDisplayName function

    Output current Locale's display name than set it to swiss locale

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

    Expected Result: English (United States) → Deutsch (Schweiz)

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

    Spec-Zone.ru

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