In order to use a message file, you need to translate the .msg file into a .lng file. You do this by running the conversion program.
Run the conversion from a command prompt using the following syntax:
msgc /l filename.msg
where filename.msg is the name of the file you previously created.
This validates your .msg file, and generates a .lng file from it.
You must then place the .lng file in a sub-directory to the directory containing the application's main executable in order for the run time system to pick it up when the application runs. The naming of the directory must be as follows:
lang\<locale-name>
where <locale-name> is one of:
locale-name | Language |
---|---|
en_US | American English |
en_GB | English |
ja_JP | Japanese |
fr_CA | Canadian French |
da_DK | Danish |
nl_NL | Dutch |
fi_FI | Finnish |
fr_FR | French |
de_DE | German |
it_IT | Italian |
nb-NO | Norwegian |
pt_PT | Portuguese |
es_ES | Spanish |
sv_SE | Swedish |
cs_CZ | Czech |
kr_KO | Korean |
zh_CN | Chinese |
default | used for all other locales, or if required locale directory does not exist |
For example, if you generate a msg-file.lng intended for Spanish, it should be placed in the \lang\es_ES sub-directory of the directory containing the application's main executable.
If the requested .lng file cannot be found in this location, then the run-time system will next look in the current directory, and then in the language files of the installed COBOL product.