PURPOSE

mklanginfo - compiles language information constants for a locale

SYNOPSIS

mklanginfo [fname]

DESCRIPTION

This program takes the file specified as an argument, and converts the input into a file suitable for placement in $TUXDIR/locale/xx/LANGINFO where xx is a specific locale. The standard input is used if a file argument is not specified.

mklanginfo reads input lines, ignoring lines that begin with white space or '#'. Value input lines must be of the form <token> = "value"

(the characters between the token and the double-quoted value can be anything but a double quote as long as white space appears after the token). If value is the null string, the line is ignored. Otherwise, token must either be a integer between 1 and 48, inclusive, or a string as follows:

	Integer String                Value
1       DAY_1     Day 1 of the week, e.g., Sunday
2       DAY_2     Day 2 of the week, e.g., Monday
3       DAY_3     Day 3 of the week, e.g., Tuesday
4       DAY_4     Day 4 of the week, e.g., Wednesday
5       DAY_5     Day 5 of the week, e.g., Thursday
6       DAY_6     Day 6 of the week, e.g., Friday
7       DAY_7     Day 7 of the week, e.g., Saturday
8       ABDAY_1   Abbreviated day 1 of the week, e.g., Sun
9       ABDAY_2   Abbreviated day 2 of the week, e.g., Mon
10      ABDAY_3   Abbreviated day 3 of the week, e.g., Tue
11      ABDAY_4   Abbreviated day 4 of the week, e.g., Wed
12      ABDAY_5   Abbreviated day 5 of the week, e.g., Thu
13      ABDAY_6   Abbreviated day 6 of the week, e.g., Fri
14      ABDAY_7   Abbreviated day 7 of the week, e.g., Sat
15      MON_1     Month 1 of the year, e.g., January
16      MON_2     Month 2 of the year, e.g., February
17      MON_3     Month 3 of the year, e.g., March
18      MON_4     Month 4 of the year, e.g., April
19      MON_5     Month 5 of the year, e.g., May
20      MON_6     Month 6 of the year, e.g., June
21      MON_7     Month 7 of the year, e.g., July
22      MON_8     Month 8 of the year, e.g., August
23      MON_9     Month 9 of the year, e.g., September
24      MON_10    Month 10 of the year, e.g., October
25      MON_11    Month 11 of the year, e.g., November
26      MON_12    Month 12 of the year, e.g., December
27      ABMON_1   Abbreviated month 1 of the year, e.g., Jan
28      ABMON_2   Abbreviated month 2 of the year, e.g., Feb
29      ABMON_3   Abbreviated month 3 of the year, e.g., Mar
30      ABMON_4   Abbreviated month 4 of the year, e.g., Apr
31      ABMON_5   Abbreviated month 5 of the year, e.g., May
32      ABMON_6   Abbreviated month 6 of the year, e.g., Jun
33      ABMON_7   Abbreviated month 7 of the year, e.g., Jul
34      ABMON_8   Abbreviated month 8 of the year, e.g., Aug
35      ABMON_9   Abbreviated month 9 of the year, e.g., Sep
36      ABMON_10  Abbreviated month 10 of the year, e.g., Oct
37      ABMON_11  Abbreviated month 11 of the year, e.g., Nov
38      ABMON_12  Abbreviated month 12 of the year, e.g., Dec
39      RADIXCHAR Radix character, e.g., '.'
40      THOUSEP   Separator for thousands
41      YESSTR    Affirmative response string, e.g., yes
42      NOSTR     Negative response string, e.g., no
43      CRNCYSTR  Currency symbol
44      D_T_FMT   string for formatting date and time,
                  e.g., "%a %b %d %H:%M:%S %Y"
45      D_FMT     string for formatting date, e.g., "%m/%d/%y"
46      T_FMT     string for formatting time, e.g., "H:%M:%S"
47      AM_FMT    Ante Meridian affix, e.g., AM
48      PM_FMT    Post Meridian affix, e.g., PM

The input lines may appear in any order (if an input line appears more than once for the same value, the last line for that value is used).

After processing the file, mklanginfo prints the string name and string value for each language information constant listed above to the standard error in the order specified above. The null string is used as a value for any language information constant not specified; nl_langinfo will use the default value for the C locale (U.S. English values) for these unset constants.

If a file name is specified on the command name, mklanginfo writes the "compiled" output to fname.out; otherwise, the output is written to the standard output. The format is a list of all of the null-terminated string values (without newlines).

DIAGNOSTIC

If an error occurs in reading the file or in the syntax, an error message is printed to the standard error and the program exits with exit code 1. On success, the program exits with exit code 0.

EXAMPLES

The default values for the TUXEDO System (locale C) are located in $TUXDIR/locale/C/lang.text. To provide French values, an administrator might do the following:

mkdir $TUXDIR/locale/french
cd $TUXDIR/locale/french
cp $TUXDIR/locale/C/lang.text .
ed lang.text
 ... convert to French values
w
q
mklanginfo  < lang.text > LANGINFO

FILES

$TUXDIR/locale/C/lang.text - the default values for the C locale
$TUXDIR/locale/C/LANGINFO - the "compiled" file for the C locale
$TUXDIR/locale/xx/LANGINFO - the "compiled" file for the "xx" locale

NOTICES

The mklanginfo command and the resulting LANGINFO file are needed only if the TUXEDO System compatibility functions for setlocale(), strftime(), or nl_langinfo() are used. The functions provided with the UNIX System use a different set and format of files.

SEE ALSO


langinfo(5),
nltypes(5)