How to use NLS / COUNTRY settings

2008-03-09

This is taken from a 2004-06-04 posting in the now closed bugzilla item 1236, as the posting basically solves the "bug"... Note that we do have NLSFUNC and COUNTRY.SYS support now, but only in the "unstable" branch of the kernel. The stable / normal versions of the kernel now have more built-in country settings, not only German.

Relevant patches in the unstable kernel are NLSFUNC / COUNTRY.SYS / mixed unrelated stuff (r1023) NLS uppercase/collating/YesNo tables (r1039) more COUNTRY.SYS parsing (r1051) (also r1052) (also r1054) (also r1071) country.sys update (r1061) (bugfix r1261) DBCS hooks (r1040) and partial NLSFUNC support in stable kernel (r1037)

The question - Aitor 2002-07-23

Yes, it is mentioned, but there's no NLS yet. No COUNTRY=, no MODE CON CP, no NLSFUNC, no DISPLAY.SYS, etc. *Some* programs, but only a few of them, would make use of SET LANG= in order to display localised versions of some strings. But this is not NLS, stricly speaking.

A partial answer - Eric 2004-06-04

We do have some NLS documentation, you can find it at:

Note that we have no NLSFUNC at the moment, only kernel-builtin data structures and kernel-builtin 2f.140x fallback handlers for countries US/English and Germany/German. NLSFUNC is needed as a COUNTRY.sYS file parser by the kernel. DISPLAY / PRINTER codepages also need .CPI files and the MODE tool - for DISPLAY, this system is working. For PRINTER, we would have to know which printer models / brands should be supported.

NLSFUNC is also used to propagate country changes to DISPLAY (which in turn informs KEYB), PRINTER and "all device drivers which support the right IOCTLs" (i.e. NLSFUNC would surf the device chain and send IOCTLs).

However, you can use MODE to trigger DISPLAY (and KEYB) codepage changes directly. To set the country (date / time / uppercase / ...), you are limited to COUNTRY= in CONFIG.SYS now, but the NLSFUNC TSR would allow you to use CHCP to dynamically load other countries / codepages from COUNTRY.SYS without having to reboot.

In addition, we have the NLSPATH and LANG variables: Those tell i18n-aware programs which translated message files they should use. Supported by only a few tools in 2004: CHOICE, DISKCOPY, FC, FIND, HELP, MORE, RUNTIME, SORT, TREE. You can use a simple text editor to create new translations to new languages.

Other tools support language selection at compile time (e.g. CTMOUSE) or with special configuration tools (e.g. FreeCOM COMMAND.COM shell). If you use a FreeCOM in your language, your FreeDOS will already "feel quite translated" during everyday use. A version of the HTML help system has been translated to German language - to provide other translations, unzip the database, translate the HTMLs, ZIP them up again.