tsd:language

Purpose

This element specifies information about the language to be used. For example, give the value attribute the value "de" to specify the German language.

For more information on internationalization aspects of the Tamino Schema Definition Language, refer to Collations.

Parent element tsd:collation
Child elements None
Attributes value
Attributes
Name Type Description
value xs:string See description below.

Description of value attribute

The value of the value attribute is a string containing valid language and country codes. This string must be composed as explained in the section Collations:

A locale in the sense of ICU (International Components for Unicode) has up to three parts:

  1. ISO 639 Language Code
    The first argument is a lower-case two-letter language code as defined by ISO 639. You can find a full list of these codes at http://www.loc.gov/standards/iso639-2/iso639jac.html.

  2. ISO 3166 Country Code
    The second argument is a country code as defined by ISO 3166. These codes appear in two different forms:

    • upper-case two-letter codes (A2 code);

    • upper-case three-letter codes (A3 code).

    You can find a full list of these codes at http://www.iso.org/iso/country_codes.htm.

  3. Suffix
    A suffix can be specified for various purposes, for instance EURO for specifying a table containing a Euro currency symbol.

    Note:
    There is no difference in the sorting order whether EURO is specified or not.

In ICU, a locale is represented by one string that consists of a mandatory ISO 639 language code plus an optional ISO 3166 country code plus an optional suffix. Tamino allows two different styles for delimiting the components:

  • ICU style
    The separator is the underscore sign. For example, German for Germany with a Euro sign is expressed as de_DE_EURO.

  • RFC-1766 style
    The separator is the minus sign, for example: de-DE-EURO.

Note:
Locale names are case-insensitive. Usually the language part of the locale is lowercase, the country is uppercase and the variant part is uppercase.

For a list of available code strings refer to the section Language and Country Codes in the appendix.

Example 1

The following example illustrates the use of the tsd:language element within an element definition to define an element for an address that is handled as English.

<xs:element name = "address">
  <xs:annotation>
    <xs:appinfo>
      <tsd:elementInfo>
        <tsd:logical>
          <tsd:collation>
            <tsd:language value="en"/>
            <tsd:strength value="primary"/>
            <tsd:caseFirst value = "upperFirst"/>
            <tsd:alternate value = "shifted"/>
            <tsd:caseLevel value = "false"/>
            <tsd:french value = "false"/>
            <tsd:normalization value ="false"/>
          </tsd:collation>
        </tsd:logical>
        <tsd:physical>
          <tsd:native>
            <tsd:index>
              <tsd:standard/>
            </tsd:index>
          </tsd:native>
        </tsd:physical>
      </tsd:elementInfo
    </xs:appinfo>
  </xs:annotation>
  <xs:complexType>
    <xs:simpleContent>
      <xs:extension base = "xs:string">
      <xs:attribute ref = "xml:lang" fixed = "en"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
</xs:element>

Example 2

The same for American English (country = USA). Simply change the line:

<tsd:language value="en">

in the above example to the following:

<tsd:language value="en_US">

Example 3

The same for German with phonebook-like sorting order. Simply change the line:

<tsd:language value="en">

in the above example to the following:

<tsd:language value="de__PHONEBOOK">