Subversion Repositories SvarDOS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1211 mateusz.vi 1
%hInternationalization and NLS overview
2
 
3
SvarDOS is a multi-language system, meaning that it can be set to operate in a
4
variety of languages. This process comes in several distinct steps, all of
5
which are preset inside AUTOEXEC.BAT by the SvarDOS installer during the
6
installation of your system.
7
 
8
This article aims at explaining the basics to provide the user with enough
9
knowledge to configure his system in the most common situations. For detailed
10
information about advanced settings please consult the documentation of each
11
of the mentioned programs.
12
 
13
 
14
%hOutputting message in your language
15
 
16
The majority of CORE SvarDOS programs are able to output their messages in
17
different languages. To know which language should be used, they look for two
18
environment variables:
19
 
20
LANG - the language to output messages in
21
NLSPATH - provides the path where all language files are stored
22
 
23
Example:
24
 
25
SET LANG=FR
26
SET NLSPATH=%DOSDIR%\NLS
27
 
28
 
29
%hSetting up your video adapter to a suitable codepage
30
 
31
Many languages come with glyphs specific to their alphabet. That is why
32
codepages have been designed - a codepage is a set of glyphs that are adapted
33
to display one or more languages. The default codepage hardcoded into most
34
video adapters is the 437 codepage, known as "US ASCII". Using this codepage
35
requires no configuration, but outputting messages in a non-English language
36
might require using a different codepage. Loading a user codepage requires an
37
EGA or VGA card. Older cards (MDA, CGA, Hercules...) had a single codepage
38
hardwired in their memory.
39
 
40
Setting up a custom (non-437) codepage on your system requires the DISPLAY
41
driver to be loaded. This driver is a TSR that makes sure to refresh the
42
custom codepage whenever the video adapter reverts to its default one
43
(typically after every video mode change).
44
 
45
To load the DISPLAY driver, use this command:
46
 
47
DISPLAY CON=(EGA,,1)
48
 
49
Once DISPLAY is loaded, you may configure your video adapter with the codepage
50
of your choice using the two commands below:
51
 
52
MODE CON CP PREP=((CODEPAGE) PATH-TO-THE-CPI-DEFINITION)
53
MODE CON CP SEL=CODEPAGE
54
 
55
...where "CODEPAGE" is the identifier of your codepage, like 850, 991, etc and
56
"PATH-TO-CPI-DEFINITION" is the full path to the CPI or CPX file that contains
57
the definition of glyphs for the given codepage.
58
 
59
Working example for the Polish language:
60
 
61
MODE CON CP PREP=((991) C:\SVARDOS\CPI\EGA10.CPX)
62
MODE CON CP SEL=991
63
 
64
You may see the full list of available CPX files and the exact codepages that
65
each of them contain here: %lnls-cpx.ama:List of CPX files and their codepages%t.
66
 
67
 
68
%hKeyboard layout
69
 
70
Displaying country-specific glyphs is one thing, but typing them is another.
71
To set up the keyboard layout suitable to your country, use the "KEYB" TSR.
72
 
73
Example: KEYB PL
74
 
75
 
76
%hNLS settings
77
 
78
A language is not only different words and glyphs, it is also different
79
conventions for things like paper sizes, currency, units of measurement,
80
battery sizes, time format, and many other.
81
 
82
DOS NLS support addresses a few of these variations through a standard,
83
system-wide NLS API. In SvarDOS, this API can be configured through the
84
LOCALCFG tool that generates a SYS file suitable for being loaded via a
85
COUNTRY directive in CONFIG.SYS.