Previous Topic: Block ScopeNext Topic: Common Statements


Language Statement

The language statement describes the native (human) language of the .MIF file. This optional statement, if provided, appears before the start component statement. The syntax is as follows, with language string being a text string that identifies the language, dialect as territory, and character encoding:

language = "language string"

The format of the language string is as follows, where language-code is one of the two-letter codes defined in ISO 639, territory-code is one of the two letter codes defined in ISO 3166, and encoding is either ISO8859-1 or Unicode.

language-code|territory-code|encoding

For example, the following language string indicates French Canadian, with ISO8859-1 (8-bit) encoding:

"fr|CA|iso8859-1"

If any fields are not supplied, they are omitted, but the two vertical bars must appear in the string. The default language string is

"en|US|iso8859-1".

The encoding field is ignored in the .MIF file, because the first two bytes of the file determine the encoding. However, the encoding field is used when communicating through .MIF files.

Since users can edit the .MIF file to translate the literal strings to a different language, they can change the language string also. The language statement can appear only once per .MIF file.

Samples of the codes defined in the two ISO standards are found at the end of this chapter.

Note: .MIF files that have been localized, that is, translated, should translate only literal strings. For example, names, descriptions and enumeration literals, and any comments in the MIF. Do not localize class strings or language names. Keywords must not be localized.