Initializes a new Culture instance from the supplied name.
Initializes a new Culture instance from the supplied culture identifier.
Copies the current Culture instance.
Retrieves an object defining how to format the specified type.
Returns the name of the Culture.
$(ANCHOR Culture_calendar) Property. Retrieves the calendar used by the culture.
$(ANCHOR Culture_current) Property. Retrieves the culture of the current user.
Property. Assigns the culture of the current user.
$(ANCHOR Culture_dateTimeFormat) Property. Retrieves a DateTimeFormat defining the culturally appropriate format for displaying dates and times.
Property. Assigns a DateTimeFormat defining the culturally appropriate format for displaying dates and times.
Property. Retrieves the name of the Culture in the format <languagename> (<regionname>) in English.
Property. Retrieves the identifier of the Culture.
Property. Retrieves the RFC 3066 identification for a language.
Property. Retrieves the invariant Culture.
Property. Retrieves a value indicating whether the current instance is a neutral culture.
Property. Retrieves a value indicating whether the instance is read-only.
$(ANCHOR Culture_name) Property. Retrieves the name of the Culture in the format <language>"-"<region>.
Property. Retrieves the name of the Culture in the format <languagename> (<regionname>) in its native language.
* $(ANCHOR Culture_numberFormat) * Property. Retrieves a NumberFormat defining the culturally appropriate format for displaying numbers and currency. * Returns: A NumberFormat defining the culturally appropriate format for displaying numbers and currency.
Property. Assigns a NumberFormat defining the culturally appropriate format for displaying numbers and currency.
Property. Retrieves the list of calendars that can be used by the culture.
Property. Retrieves the Culture representing the parent of the current instance.
Property. Retrieves the three-letter language code of the culture.
Property. Retrieves the two-letter language code of the culture.
Returns a read-only instance of a culture using the specified culture identifier.
Returns a read-only instance of a culture using the specified culture name.
Returns a read-only instance using the specified name, as defined by the RFC 3066 standard and maintained by the IETF.
Returns a list of cultures filtered by the specified CultureTypes.
$(ANCHOR IFormatService_getFormat) Retrieves an object that supports formatting for the specified _type.
import tango.io.Stdout, tango.text.locale.Core; void main() { Culture culture = new Culture("it-IT"); Stdout.formatln("englishName: {}", culture.englishName); Stdout.formatln("nativeName: {}", culture.nativeName); Stdout.formatln("name: {}", culture.name); Stdout.formatln("parent: {}", culture.parent.name); Stdout.formatln("isNeutral: {}", culture.isNeutral); } // Produces the following output: // englishName: Italian (Italy) // nativeName: italiano (Italia) // name: it-IT // parent: it // isNeutral: false
$(ANCHOR _Culture) Provides information about a culture, such as its name, calendar and date and number format patterns. Remarks: tango.text.locale adopts the RFC 1766 standard for culture names in the format <language>"-"<region>. <language> is a lower-case two-letter code defined by ISO 639-1. <region> is an upper-case two-letter code defined by ISO 3166. For example, "en-GB" is UK English.
There are three types of culture: invariant, neutral and specific. The invariant culture is not tied to any specific region, although it is associated with the English language. A neutral culture is associated with a language, but not with a region. A specific culture is associated with a language and a region. "es" is a neutral culture. "es-MX" is a specific culture.
Instances of DateTimeFormat and NumberFormat cannot be created for neutral cultures.