Skip navigation.

Command Reference

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents View as PDF   Get Adobe Reader

 


mklanginfo(1)

Name

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. The language values are used by setlocale(3c), strftime(3c), and nl_langinfo(3c).

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 be either an integer between 1 and 48, inclusive, or a string, as follows:

Integer String  Value 1

DAY_1 Day 1 of the week, for example, Sunday 2
DAY_2 Day 2 of the week, for example, Monday 3
DAY_3 Day 3 of the week, for example, Tuesday 4
DAY_4 Day 4 of the week, for example, Wednesday 5
DAY_5 Day 5 of the week, for example, Thursday 6
DAY_6 Day 6 of the week, for example, Friday 7
DAY_7 Day 7 of the week, for example, Saturday 8
ABDAY_1 Abbreviated day 1 of the week, for example, Sun 9
ABDAY_2 Abbreviated day 2 of the week, for example, Mon 10
ABDAY_3 Abbreviated day 3 of the week, for example, Tue 11
ABDAY_4 Abbreviated day 4 of the week, for example, Wed 12
ABDAY_5 Abbreviated day 5 of the week, for example, Thu 13
ABDAY_6 Abbreviated day 6 of the week, for example, Fri 14
ABDAY_7 Abbreviated day 7 of the week, for example, Sat 15
MON_1 Month 1 of the year, for example, January 16
MON_2 Month 2 of the year, for example, February 17
MON_3 Month 3 of the year, for example, March 18
MON_4 Month 4 of the year, for example, April 19
MON_5 Month 5 of the year, for example, May 20
MON_6 Month 6 of the year, for example, June 21
MON_7 Month 7 of the year, for example, July 22
MON_8 Month 8 of the year, for example, August 23
MON_9 Month 9 of the year, for example, September 24
MON_10 Month 10 of the year, for example, October 25
MON_11 Month 11 of the year, for example, November 26
MON_12 Month 12 of the year, for example, December 27
ABMON_1 Abbreviated month 1 of the year, for example, Jan 28
ABMON_2 Abbreviated month 2 of the year, for example, Feb 29
ABMON_3 Abbreviated month 3 of the year, for example, Mar 30
ABMON_4 Abbreviated month 4 of the year, for example, Apr 31
ABMON_5 Abbreviated month 5 of the year, for example, May 32
ABMON_6 Abbreviated month 6 of the year, for example, Jun 33
ABMON_7 Abbreviated month 7 of the year, for example, Jul 34
ABMON_8 Abbreviated month 8 of the year, for example, Aug 35
ABMON_9 Abbreviated month 9 of the year, for example, Sep 36
ABMON_10 Abbreviated month 10 of the year, for example, Oct 37
ABMON_11 Abbreviated month 11 of the year, for example, Nov 38
ABMON_12 Abbreviated month 12 of the year, for example, Dec 39
RADIXCHAR Radix character, for example, '.' 40
THOUSEP Separator for thousands 41
YESSTR Affirmative response string, for example, yes 42
NOSTR Negative response string, for example, no 43
CRNCYSTR Currency symbol 44
D_T_FMT string for formatting date and time, for example, "%a%b%d%H:%M:0Y" 45
D_FMT string for formatting date, for example, "%m/%d/%y" 46
T_FMT string for formatting time, for example, "H:%M:%S" 47
AM_FMT Ante Meridian affix, for example, AM 48
PM_FMT Post Meridian affix, for example, 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 shown in the previous code listing to the standard error in the order specified in the listing. The null string is used as a value for any language information constant not specified; nl_langinfo uses the default value for the C locale (U.S. English values) for these unset constants.

If a filename 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 defaults for the BEA Tuxedo system (locale C) are located in $TUXDIR/locale/C/lang.text. To provide French values, an administrator might do the following (on a UNIX system platform):

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 BEA 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

nl_langinfo(3c), setlocale(3c), strftime(3c), langinfo(5)

 

Skip navigation bar  Back to Top Previous Next