GTLANG

xcall GTLANG, status, gtlang'map

GTLANG.SBR retrieves information from the currently selected language definition file, such as the names of the days of the week, affirmative and negative abbreviations, currency symbol, etc. Using these variables instead of hard coding such information can go a long way towards making your application adaptable to other languages.

The A-Shell extended form of the ASHINC:GTLANG.MAP file is supported in order to return the upper collating sequence. The sample program GTLANG in EXLIB:[908,49] is provided to illustrate.

Parameters

status (F,6) returns 0 for success or –1 for failure.

gtlang'map

The following table shows the variable names.

Variable name

Type

Description

LANG'NAME1, LANG'NAME2

S,20

Standard and alternate names for the language.

LANG'EXTENSION

S,4

is the extension used for message files associated with this language. For example, the extension for the englsh.ldf (Language Definition File) is USA, which is why you will find message files with names like errmsg.usa, sbrmsg.usa, litmsg.usa, etc.

LANG'CURRENCY'SYM

S,4

Currency symbol for this language.

LANG'CURRENCY'POS

F,6

Will be set to 0 if the symbol should appear before the currency amount, or 1 if after.

LANG'CURRENCY'SPC

F,6

Specifies the "currency spacing" (whatever that is).

LANG'CURRENCY'SIZE

F,6

Specifies the number of digits making up the "currency amount" (whatever that means).

LANG'THOUSANDS

S,1

Character to be used to separate thousands (i.e. to insert between every three digits). In the USA we use a comma, while in much of Europe they use the period, with the comma being used for the decimal point.

LANG'DECIMAL

S,1

Character to be used for the decimal point.

LANG'DATE'FORMAT

F,6

Date format: 0=month-day-year, 1=day-month-year, 2=year-month-date.

LANG'TIME'FORMAT

F,6

Time format: 0=12 hour, 1=24 hour.

LANG'DATE'SEP

S,1

Character used to separate the day, month, and year parts of a date, e.g. "/" for MM/DD/YY.

LANG'TIME'SEP

S,1

Character used to separate the hours, minutes, and seconds in time (typically ":").

LANG'DATA'SEP

S,1

Character used to separate elements of data.

LANG'PPN'LEFT, LANG'PPN'RIGHT

S,1

Characters used to enclose PPN, (e.g. [7,6]).

LANG'CHARSET

F,6

Character set number to be used. This is probably only relevant under AMOS.

LANG'YES'WORD, LANG'NO'WORD

S,6

Complete name of the affirmative word ("yes", "sí", "ouí", etc.) or negative word ("no", "non", "nyet", etc.).

LANG'YES'CHAR, LANG'NO'CHAR

S,1

Standard one-character abbreviation for yes'word and no'word.

LANG'WORD'CHARS

S,30

Contains all of the characters that can be considered part of a word in this language. (For English, this is just A-Z and a-z, but other languages may allow for accented or other special characters.)

LANG'ULC

S,30

May specify up to 15 pairs of upper and lower case letters that are to be considered equivalent. The idea here is to identify how to fold accented and other special characters to upper and lower case. (Not necessary for the standard ASCII A-Z.)

LANG'SPARE

S,30

Reserved for something.

LANG'USR

S,30

Reserved for user-defined extensions to the language definition.

LANG'COL

X,128

May be used to specify the first 128 bytes of the collating sequence for this language. It should consist of all the characters 0-127 in ascending sort order. If you are using an 8 bit character set, then the upper 128 bytes may be placed in Col2 provided that the Extend1 and Extend2 fields are set appropriately.

LANG'JAN <through> LANG'DEC

S,20

Full names of the twelve months of the year: Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec

LANG'MON <through> LANG'SUN

S,20

Full names of the seven days of the week: Mon, Tue, Wed, Thu, Fri, Sat, Sun

LANG'EXTEND1, LANG'EXTEND2

B,1

Set to 1 to indicate that the corresponding collating sequence field (Col and Col2 respectively) is valid.

LANG'COL2

X,128

Collating sequence for the second 128 bytes (128-255) of the character set.

Definition file: gtlang.map