How to localize KP Typing Tutor
From the first version of KP Typing Tutor series, all versions could use
courses files in most alphabetic languages. Many people around the world have
been using Typing Course Generator to create courses in different languages,
though the user interfaces were still in English.
Some people think it could be better to have the interfaces in their mother
languages. Someone told me he had used some kind of internationalization tool to
translate the resource of the EXE file directly. However, new version of KP
Typing Tutor may not use the translated resource file for the old version.
From version 5.1, KP Typing Tutor reads two text files (language.txt and
translat.txt) as translation resource. These two files were originally generated
by Multilizer of InnoView. You may translate "translat.txt" and
modify "language.txt". And following versions will be able to use
the translated files. Of course, you may need to add a few more lines to adapt
new changes. Parts of this article are digests of the User Manuals of Multilizer.
Modify the translation resource
The translation resource consists of two text files: "translat.txt"
(Translation table), and "language.txt" (Language table).
1. Study the structures of the text files.
Columns of each table are separated by Tab characters. If you use a text
editor like MS Word to open "translat.txt", you may see Tab
characters represented by right arrows, and spaces represented by middle dots.
The left-most column (Native column) is the string to be translated.
A translation table contains the native
string and all its translation string in a single line. Each string is separated
by a Tab character, as outlined below
Native<tab> [Form] <tab>
[Component] <tab> Language#1<tab> Language#2<tab> Language#N
where
Item
|
Description
|
Native
|
the native language
|
Form
|
the name of the form where the
string belongs to. This field is only in the context sensitive dictionary.
|
Component
|
the name of the component where
the string belongs to. This field is only in the context sensitive
dictionary.
|
Language#1
|
the first supported language
|
Language#2
|
the second supported language
|
Language#N
|
the last supported language.
|
KP TT will read another file "language.txt" to decide which
translation to use according the locale of your computer. When you open
"language.txt", you may see the following table.
The table contains one line of data for
each language. Each data item is separated by a tab character, as illustrated
below:
EnglishName<tab>
NativeName<tab> Primary<tab> Subs<tab> DefaultSub<tab>
FontName<tab> FontSize<tab> Options<tab> Charset<tab>
CodePage<tab> ISOLanguage<tab> ISOCountries<tab>
ISODefaultCountry<cr><lf>
where
Item |
Description |
Primary |
The primary language id of the language |
Subs |
An integer list that contains all sub languages ids |
DefaultSub |
The default sub language id |
CodePage |
The Windows code page that the language uses |
ISOLanguage |
ISO Language Code. These codes are the lower-case two-letter codes as defined by ISO-639. |
ISODefaultCountry |
ISO Country Code. These codes are the upper-case two-letter codes as defined by ISO-3166. |
KP TT does not use "EnglishName"
and "NativeName". You may define any string for these two columns, KP
TT will just know the first translation of table "translat.txt" is for
German of Germany, because ISOLanguage is de and ISODefaultCountry is DE.
The table below illustrates another example of "translat.txt".
English name
|
Native name
|
Primary
|
Subs
|
Default sub
|
Font name
|
Font size
|
Options
|
Char set
|
Code page
|
ISO Language
|
ISO Countries
|
ISO Def. Count
|
Native
|
Native
|
0
|
|
0
|
|
0
|
2
|
0
|
0
|
|
|
|
English
|
English
|
9
|
|
2
|
|
0
|
2
|
0
|
1252
|
en
|
|
UK
|
US English
|
US English
|
9
|
1,8,9
|
1
|
|
0
|
2
|
0
|
1252
|
en
|
US,JM
|
US
|
German
|
Deutsch
|
7
|
|
1
|
|
0
|
0
|
0
|
1252
|
de
|
|
DE
|
Finnish
|
suomi
|
11
|
|
1
|
|
0
|
0
|
0
|
1252
|
fi
|
|
FI
|
Swedish
|
svenska
|
29
|
|
1
|
Arial
|
0
|
0
|
0
|
1252
|
sv
|
|
SE
|
2. Translate the first translation column.
If you want to add translation of another language, you may add a line in
"language.txt" following the format of the examples. You may find more
technical details at following sections. Then add a new column in "translat.txt"
by adding a Tab character and new translation at the end of each line.
Alternatively, you may replace any existing translation.
References
Neutral
|
0
|
Afrikaans
|
54
|
Albanian
|
28
|
Arabic
|
1
|
Basque
|
45
|
Bulgarian
|
2
|
Byelorussian
|
35
|
Catalan
|
3
|
Chinese
|
4
|
Czech
|
5
|
Danish
|
6
|
Dutch
|
19
|
English
|
9
|
Estonian
|
37
|
Farsi
|
41
|
Finnish
|
11
|
French
|
12
|
German
|
7
|
Greek
|
8
|
Hebrew
|
13
|
Hungarian
|
14
|
Icelandic
|
15
|
Indonesian
|
33
|
Italian
|
16
|
Japanese
|
17
|
Kampuchean
|
44
|
Korean
|
18
|
Laotian
|
43
|
Latvian
|
38
|
Lithuanian
|
39
|
Macedonian
|
47
|
Maori
|
40
|
Norwegian
|
20
|
Polish
|
21
|
Portuguese
|
22
|
Rhaeto Roman
|
23
|
Romanian
|
24
|
Russian
|
25
|
Serbo Croatian
|
26
|
Slovak
|
27
|
Slovenian
|
36
|
Sorbian
|
46
|
Spanish
|
10
|
Sutu
|
48
|
Swedish
|
29
|
Thai
|
30
|
Tsonga
|
49
|
Tswana
|
50
|
Turkish
|
31
|
Ukrainian
|
34
|
Urdu
|
32
|
Venda
|
51
|
Vietnamese
|
42
|
Xhosa
|
52
|
Zulu
|
53
|
Neutral
|
0
|
Default
|
1
|
System Default
|
2
|
Arabic (Saudi Arabia)
|
1
|
Arabic (Iraq)
|
2
|
Arabic (Egypt)
|
3
|
Arabic (Libya)
|
4
|
Arabic (Algeria)
|
5
|
Arabic (Morocco)
|
6
|
Arabic (Tunisia)
|
7
|
Arabic (Oman)
|
8
|
Arabic (Yemen)
|
9
|
Arabic (Syria)
|
16
|
Arabic (Jordan)
|
17
|
Arabic (Lebanon)
|
18
|
Arabic (Kuwait)
|
19
|
Arabic (U.A.E.)
|
20
|
Arabic (Bahrain)
|
21
|
Arabic (Qatar)
|
22
|
Chinese (Taiwan)
|
1
|
Chinese (PRC)
|
2
|
Chinese (Hong Kong)
|
3
|
Chinese (Singapore)
|
4
|
Dutch
|
1
|
Dutch (Belgian)
|
2
|
English (US)
|
1
|
English (UK)
|
2
|
English (Australian)
|
3
|
English (Canadian)
|
4
|
English (New Zealand)
|
5
|
English (Ireland)
|
6
|
French
|
1
|
French (Belgian)
|
2
|
French (Canadian)
|
3
|
French (Swiss)
|
4
|
French (Luxembourg)
|
5
|
German
|
1
|
German (Swiss)
|
2
|
German (Austrian)
|
3
|
German (Luxembourg)
|
4
|
German (Liechtenstein)
|
5
|
Hebrew (Israel)
|
4
|
Italian
|
1
|
Italian (Swiss)
|
2
|
Norwegian (Bokmal)
|
1
|
Norwegian (Nynorsk)
|
2
|
Portuguese (Brazilian)
|
1
|
Portuguese
|
2
|
Serbo Croatian (Latin)
|
1
|
Serbo Croatian (Cyrillic)
|
2
|
Spanish (Traditional Sort)
|
1
|
Spanish (Mexican)
|
2
|
Spanish (Modern Sort)
|
3
|
Locale description
|
Short String |
Afrikaans |
af |
Albanian |
sq |
Arabic – United Arab Emirates |
ar-ae |
Arabic - Bahrain |
ar-bh |
Arabic - Algeria |
ar-dz |
Arabic - Egypt |
ar-eg |
Arabic - Iraq |
ar-iq |
Arabic - Jordan |
ar-jo |
Arabic - Kuwait |
ar-kw |
Arabic - Lebanon |
ar-lb |
Arabic - Libya |
ar-ly |
Arabic - Morocco |
ar-ma |
Arabic - Oman |
ar-om |
Arabic - Qatar |
ar-qa |
Arabic - Saudi Arabia |
ar-sa |
Arabic - Syria |
ar-sy |
Arabic - Tunisia |
ar-tn |
Arabic - Yemen |
ar-ye |
Armenian |
hy |
Azeri – Latin |
az-az |
Azeri – Cyrillic |
az-az |
Basque |
eu |
Belarusian |
be |
Bulgarian |
bg |
Catalan |
ca |
Chinese - China |
zh-cn |
Chinese - Hong Kong S.A.R. |
zh-hk |
Chinese – Macau S.A.R |
zh-mo |
Chinese - Singapore |
zh-sg |
Chinese - Taiwan |
zh-tw |
Croatian |
hr |
Czech |
cs |
Danish |
da |
Dutch – The Netherlands |
nl-nl |
Dutch - Belgium |
nl-be |
English - Australia |
en-au |
English - Belize |
en-bz |
English - Canada |
en-ca |
English – Carribbean |
en-cb |
English - Ireland |
en-ie |
English - Jamaica |
en-jm |
English - New Zealand |
en-nz |
English – Phillippines |
en-ph |
English - South Africa |
en-za |
English - Trinidad |
en-tt |
English - United Kingdom |
en-gb |
English - United States |
en-us |
Estonian |
et |
Farsi |
fa |
Finnish |
fi |
Faroese |
fo |
French - France |
fr-fr |
French - Belgium |
fr-be |
French - Canada |
fr-ca |
French - Luxembourg |
fr-lu |
French - Switzerland |
fr-ch |
Gaelic – Ireland |
gd-ie |
Gaelic - Scotland |
gd |
German - Germany |
de-de |
German - Austria |
de-at |
German - Liechtenstein |
de-li |
German - Luxembourg |
de-lu |
German - Switzerland |
de-ch |
Greek |
el |
Hebrew |
he |
Hindi |
hi |
Hungarian |
hu |
Icelandic |
is |
Indonesian |
id |
Italian - Italy |
it-it |
Italian - Switzerland |
it-ch |
Japanese |
ja |
Korean |
ko |
Latvian |
lv |
Lithuanian |
lt |
FYRO Macedonian |
mk |
Malay - Malaysia |
ms-my |
Malay – Brunei |
ms-bn |
Maltese |
mt |
Marathi |
mr |
Norwegian - Bokmål |
no-no |
Norwegian – Nynorsk |
no-no |
Polish |
pl |
Portuguese - Portugal |
pt-pt |
Portuguese - Brazil |
pt-br |
Raeto-Romance |
rm |
Romanian - Romania |
ro |
Romanian - Moldova |
ro-mo |
Russian |
ru |
Russian - Moldova |
ru-mo |
Sanskrit |
sa |
Serbian - Cyrillic |
sr-sp |
Serbian – Latin |
sr-sp |
Setsuana |
tn |
Slovenian |
sl |
Slovak |
sk |
Sorbian |
sb |
Spanish - Spain |
es-es |
Spanish - Argentina |
es-ar |
Spanish - Bolivia |
es-bo |
Spanish - Chile |
es-cl |
Spanish - Colombia |
es-co |
Spanish - Costa Rica |
es-cr |
Spanish - Dominican Republic |
es-do |
Spanish - Ecuador |
es-ec |
Spanish - Guatemala |
es-gt |
Spanish - Honduras |
es-hn |
Spanish - Mexico |
es-mx |
Spanish - Nicaragua |
es-ni |
Spanish - Panama |
es-pa |
Spanish - Peru |
es-pe |
Spanish - Puerto Rico |
es-pr |
Spanish - Paraguay |
es-py |
Spanish - El Salvador |
es-sv |
Spanish - Uruguay |
es-uy |
Spanish - Venezuela |
es-ve |
Sutu |
sx |
Swahili |
sw |
Swedish - Sweden |
sv-se |
Swedish - Finland |
sv-fi |
Tamil |
ta |
Tatar |
tt |
Thai |
th |
Turkish |
tr |
Tsonga |
ts |
Ukrainian |
uk |
Urdu |
ur |
Uzbek – Cyrillic |
uz-uz |
Uzbek – Latin |
uz-uz |
Vietnamese |
vi |
Xhosa |
xh |
Yiddish |
yi |
Zulu |
zu |
Identifier
|
Meaning
|
037
|
EBCDIC
|
437
|
MS-DOS
United States
|
500
|
EBCDIC "500V1"
|
708
|
Arabic (ASMO 708)
|
709
|
Arabic (ASMO 449+, BCON V4)
|
710
|
Arabic (Transparent Arabic)
|
720
|
Arabic (Transparent ASMO)
|
737
|
Greek (formerly 437G)
|
775
|
Baltic
|
850
|
MS-DOS
Multilingual (Latin I)
|
852
|
MS-DOS
Slavic (Latin II)
|
855
|
IBM Cyrillic (primarily Russian)
|
857
|
IBM Turkish
|
860
|
MS-DOS
Portuguese
|
861
|
MS-DOS Icelandic
|
862
|
Hebrew
|
863
|
MS-DOS Canadian-French
|
864
|
Arabic
|
865
|
MS-DOS Nordic
|
866
|
MS-DOS Russian
|
869
|
IBM Modern Greek
|
874
|
Thai
|
875
|
EBCDIC
|
932
|
Japan
|
936
|
Chinese (PRC, Singapore)
|
949
|
Korean
|
950
|
Chinese (Taiwan, Hong Kong)
|
1026
|
EBCDIC
|
1200
|
Unicode (BMP of ISO 10646)
|
1250
|
Windows 3.1 Eastern European
|
1251
|
Windows 3.1 Cyrillic
|
1252
|
Windows 3.1 US (ANSI)
|
1253
|
Windows 3.1 Greek
|
1254
|
Windows 3.1 Turkish
|
1255
|
Hebrew
|
1256
|
Arabic
|
1257
|
Baltic
|
1361
|
Korean (Johab)
|
To find out the locale of the target computer, please check the Regional
settings.
You may see an example of translation for KP Typing Game below.
|