• Modules
    • By category
    • By name
    • Most popular
    • Most downloaded
    • Repository
  • Register
  • Log in
  • Help
    • Start using Ceylon Herd
    • Publish your first module
    • Module publishing guidelines
    • All about Ceylon
    • Keyboard Shortcuts

    • s Focus search module bar
      ? Open this information panel
      j Move selection down
      k Move selection up
      enter Open current selection
Module info
Name
FroMage / ceylon.locale / 1.3.1
Ceylon Locale Platform Module
Category SDK

The Ceylon SDK

Backends JVM JavaScript
Maven coordinates
Compatible Ceylon release JVM: 1.2.x, 1.3.x (latest)
JavaScript: 1.2.1, 1.2.2, 1.3.x (latest)
Published Nov 21, 2016
Stats Downloads (JVM): 388
Downloads (JS): 84
Source downloads: 462
Description

Provides information about locale-specific information including:

  • language,
  • currency,
  • numeric formats, and
  • data/time formats.

A locale is identified by a locale tag, as specified by IETF BCP 47, which contains:

  • a required language code, for example en, es, or ca,
  • an optional script code, for example, Latn, or Cyrl,
  • an optional country or region code, for example, AU, MX, or ES, and
  • optionally, one or more variant values, and
  • optionally, one or more extensions as name/value pairs.

Fields are separated by the character -. For example: en, ca, en-AU, es-MX.

A Locale instance may be obtained for a given tag, by calling locale:

assert (exists au = locale("en-AU"));

The system locale is also available.

The Locale object provides information about the Language, Currency and Formats of the locale it represents, along with information about the names of other languages and currencies in that locale.

Dependencies
ceylon.collection/1.3.1 shared
ceylon.language/1.3.1
ceylon.time/1.3.1 shared
Usage
  • Import
 import ceylon.locale "1.3.1";
Module links Members
Imported By
Home
Code repository
Issue tracker
Browse
Download .car
Download .js
Download source archive
Download module documentation
View API documentation

Ceylon Herd v1.24 Copyright 2012-2023 Red Hat. About