====== MKMSGF ======
===== Brief =====
Build message file from message source file
===== Syntax =====
|-|v|-|-|-|v|v|-|-|-|v|MKMSGF|-@2|
| |`|drive|'|`|path|'|
|-@2|v|-|-|-|v|v|-|-|-|v|infile|-@2|
| |`|drive|'|`|path|'| | |
|-@2|v|-|-|-|v|v|-|-|-|v|outfile|-@2|
| |`|drive|'|`|path|'|
| |,|-|-|-|-|-|.| |
|-@2|^@1f|v|-|-|-|v|^|(|
| | |)|/?|(|
| | |!| | | |!|
| | |)|/V|(|
| | |!| | | |!|
| | |)|/Q|(|
| | |!| | | |!|
| | |)|/D |(|
| | |!| | | |!|
| | |)|/P codepage|(|
| | |!| | | |!|
| | |)|/L |(|
| | |!| | | |!|
| | |)|/I path|(|
| | |!| | | |!|
| | |)|/A|(|
| | |!| | | |!|
| | |`|/C|'|
MKMSGF infile[.ext] outfile[.ext] [/?] [/V] [/D ] [/P ] [/L ]
===== Arguments =====
* infile - the input file that contains message definitions. The input-file name can be any valid OS/2 file name, optionally preceded by a drive letter and a path.
* outfile field specifies the output file created by MKMSGF. The output-file name can be any valid OS/2 file name, optionally preceded by a drive letter and a path.
A valid DBCS range is: n10,n11,n20,n21,...,nn0,nn1
A single number is taken as a DBCS country code.
The valid OS/2 language/sublanguage ID values are:
Language ID:
Code Family Sub Language Principal country
---- ------ --- -------- -----------------
ARA 1 2 Arabic Arab Countries
BGR 2 1 Bulgarian Bulgaria
CAT 3 1 Catalan Spain
CHT 4 1 Traditional Chinese R.O.C.
CHS 4 2 Simplified Chinese P.R.C.
CSY 5 1 Czech Czechoslovakia
DAN 6 1 Danish Denmark
DEU 7 1 German Germany
DES 7 2 Swiss German Switzerland
EEL 8 1 Greek Greece
ENU 9 1 US English United States
ENG 9 2 UK English United Kingdom
ESP 10 1 Castilian Spanish Spain
ESM 10 2 Mexican Spanish Mexico
FIN 11 1 Finnish Finland
FRA 12 1 French France
FRB 12 2 Belgian French Belgium
FRC 12 3 Canadian French Canada
FRS 12 4 Swiss French Switzerland
HEB 13 1 Hebrew Israel
HUN 14 1 Hungarian Hungary
ISL 15 1 Icelandic Iceland
ITA 16 1 Italian Italy
ITS 16 2 Swiss Italian Switzerland
JPN 17 1 Japanese Japan
KOR 18 1 Korean Korea
NLD 19 1 Dutch Netherlands
NLB 19 2 Belgian Dutch Belgium
NOR 20 1 Norwegian - Bokmal Norway
NON 20 2 Norwegian - Nynorsk Norway
PLK 21 1 Polish Poland
PTB 22 1 Brazilian Portugues Brazil
PTG 22 2 Portuguese Portugal
RMS 23 1 Rhaeto-Romanic Switzerland
ROM 24 1 Romanian Romania
RUS 25 1 Russian Russian Federation
SHL 26 1 Croato-Serbian (Lat Yugoslavia
SHC 26 2 Serbo-Croatian (Cyr Yugoslavia
SKY 27 1 Slovakian Czechoslovakia
SQI 28 1 Albanian Albania
SVE 29 1 Swedish Sweden
THA 30 1 Thai Thailand
TRK 31 1 Turkish Turkey
URD 32 1 Urdu Pakistan
BAH 33 1 Bahasa Indonesia
SLO 34 1 Slovene Slovenia
For a complete list of code pages and country codes, see the code page table under [[https://komh.github.io/os2books/os2tk45/cp2/061_L2_COUNTRYCODE.html|COUNTRYCODE]] in the online book Control Program Programming Guide and Reference.
===== Output File =====
The output file contains the indexed message file that DosGetMessage will use. The output-file name can be any valid OS/2 file name, optionally preceded by a drive letter and a path. The output file cannot have the same name as the input file.
To differentiate between the two files, the following convention is recommended, using the same file name.
The infile file should have a .TXT extension.
The outfile file can have a .MSG or .INC extension.
Help-message file names begin with the component identifier, followed by H.MSG. For example, the help file associated with the component identifier DOS would be DOSH.MSG.
===== Options =====
Text-based messages in different code pages can be created using MKMSGF to display errors, help information, prompt, or provide general information to the application user.
MKMSGF uses the following parameter formats to build message files:
MKMSGF infile outfile /Pcodepage
MKMSGF infile outfile /Ddbcsrange or country id
MKMSGF infile outfile /LlangID,VerId
MKMSGF infile outfile /V
MKMSGF infile outfile /?
MKMSGF @controlfile
Infile is the ASCII-text source file.
Outfile is the binary output message file or MASM include file.
@controlfile is the message definition file.
===== Options Summary =====
Type Meaning
/P Code-page ID for the input message file.
/D DbcsRange or country ID for the input message file.
/L Language family ID (one word) and language version ID (one word).
/V Verbose display of message file control variables as the message file is being created.
/? Help display of command syntax for MKMSGF.
/A Produce MASM include file using INC file as include file for message constants
/C Produce MASM include file using H file as include file for message constants
/I Include paths
Note: Any combination of /P, /D, /L, and /V switches can be used for either the command line or @controlfile execution method.
The / switch prefix and the - prefix can be used interchangeably when defining switches to MKMSGF.
/Verbose Option Output Example
Following is a sample of MKMSGF output, using the Verbose option (/V). This output was produced using the following command:
mkmsgf myapp.txt myapp.msg /v
strIn = myapp.txt
strOut = myapp.msg
StrIncDir = (null)
CodePages = 437
Language family id = 0 and sub id = 0
Language family id and sub id = unspecified
flags = none
CP_type = SBCS
"myapp.txt": length = 382 bytes.
29 messages scanned. Writing output file...
Size of table entry: word
/P Option
The Code-page option (/P) specifies the code-page ID for that input message file.
For a complete list of code pages, see the code page table under COUNTRYCODE in the online book Control Program Programming Reference.
Up to 16 /P combinations can be saved with the message file.
/P cannot be used to identify DBCS data.
/D Option
The DBCS option (/D) specifies the DBCS Range or country ID for that input message file.
A valid DBCS country ID will cause the initialization of valid DBCS ranges to be set up for this file.
See DBCS Code Pages and Country Codes for valid DBCS country codes.
/L Option
The Language option (/L) specifies the language family ID (one word) and language version ID (one word).
Valid combination of language family and language version will be set for this file.
A valid language family with invalid or undefined language version id will cause a default value of 1 to be set for language version.
/E
Produce fake extended header. This tacks on what I call a fake extended header at the end of the file and updates the header offset.
===== Control File =====
The control file (@controlfile) is used to create multiple-code-page message files. The at sign (@) is not part of the file name, but rather, a delimiter required before a control-file name.
The control file has the following format:
Example:
root.in root. Out /Pcodepage /Ddbcsrang/ctryid /LlangID,VerId
sub.001 sub1.out /Pcodepage /Ddbcsrang/ctryid /LlangID,VerId
.
.
sub.00n subn.out /Pcodepage /Ddbcsrang/ctryid /LlangID,VerId
The help option (/?) is invalid due to the purpose of the definition file.
Note: Any combination of /P /D /L and /V switches can be used for either the command line or msg_definition_file execution method.
Input Message File Example
====== Notes ======
Text based on [[https://github.com/MikeyG/mkmsgf/wiki/MKMSGF-Usage]]