GlideLocale - Scoped

  • Rversion finale: Australia
  • Mis à jour 12 mars 2026
  • 1 minute de lecture
  • The GlideLocale API provides information about display information for the local instance.

    There is no constructor for a GlideLocale object. Use the get() method to obtain a GlideLocale object.

    GlideLocale - get()

    Returns the GlideLocale object.

    Tableau 1. Parameters
    Name Type Description
    None
    Tableau 2. Returns
    Type Description
    GlideLocale The GlideLocale object.
    var locale = GlideLocale.get();

    GlideLocale - getDecimalSeparator()

    Returns the decimal separator.

    Tableau 3. Parameters
    Name Type Description
    None
    Tableau 4. Returns
    Type Description
    String The decimal separator.
    var locale = GlideLocale.get();
    var decimalSeparator = locale.getDecimalSeparator();
    gs.info( "The decimal separator is " + decimalSeparator);

    Output:

    The decimal separator is .

    GlideLocale - getGroupingSeparator()

    Returns the grouping separator.

    Tableau 5. Parameters
    Name Type Description
    None
    Tableau 6. Returns
    Type Description
    String The grouping separator.
    var locale = GlideLocale.get();var groupingSeparator = locale.getGroupingSeparator();
    gs.info( "The grouping separator is " + groupingSeparator);

    Output:

    The grouping separator is ,