1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
Dear Translator,
Here is a an outline of the steps necessary to translate the words of the game to your language. There are 175 words to translate but you can add more if you want.
The twenty two available languages so far by code: ca cs da de en es fr fi hu it nb nl nn pt pt_BR ru sl sr sr@Ltn sv tg tr
Most of this data should be completed to include hints, please see below.
Complete data: fr en it only have hints so the other above languages must be updated as soon as possible.
The words are stored in 4 separate files, one for each level. The files are in /khangman/data/en. The file easy.txt is for level easy, the file medium.txt is for level medium, the file animals.txt is for level animals and the file hard.txt is for level hard.
English is the default and thus the only language to be shipped with KHangMan. All other language data are put in the correct tde-i18n.
1. Be sure you are working with the latest cvs HEAD sources of KHangMan by issuing a
cvs up -dPA khangman
in the tdeedu module.
Then
cd tdeedu/khangman
2. Enter the following commands in a konsole to create the directory
and files for the new language:
./add_language <language_code>
Here you must replace <language_code> with your language code.
The program will refuse a non-valid language code!
3. The files now use the kvtml format. The tag <o> is for the word and the tag <t> is for the hint. Try to match the hint with the level of difficulty. The level 'Easy' will require an easy hint but the level 'Hard' will require the definition in the dictionary. Try not to use words of the same family in the hint, that would give the word away too easily! An example of a kvtml file is as follow:
<?xml version="1.0"?>
<!DOCTYPE kvtml SYSTEM "kvoctrain.dtd">
<kvtml>
<e>
<o>cane</o>
<t>รจ il tuo animale domestico preferito</t>
</e>
...
...
</kvtml>
4. Edit all indicated text files in the new directory with a text editor, and replace each word inside the <o> tag with a translated word and each hint inside a <t> with a translated hint. It is not really important that the exact meaning is preserved, but try to keep the length and level of difficulty roughly the same.
You can include words with white space or - in them, in that case the white space or the - will be shown instead of the _.
Please contact me if there is anything special related to your language so I can adapt the code to it (especially the special and accented characters).
You can just translate the words but you can also adapt them following the level and add new words if you want. For example, "table" is in level easy in English but in your language, it can be level medium. Feel free to adapt the files to your language needs. The number of words in a file is not important, you can add some if you want.
Note that you must use UTF-8 encoding when editing the files. If your editor can't do this, try using kwrite or kate. When opening a file in kwrite or kate you can select utf8 encoding with the top right combo box.
Please keep the actual english tts in your language_code dir.
5. Enter the following command to install the new data files:
make
make install
You may have to become root to run 'make install', depending on your
installation.
6. Run the game and check that your language has been added:
khangman
7. Instead of committing your files, please sent them to me tarred and gzipped. As there are now twenty two languages, a wizard (TDENewStuff) is now included in KHangMan to easily download and install new languages that are placed on the website. This is done to reduce the size of the tdeedu module and it will also be done in KLettres, KStars and maybe KTouch.
Please contact me by email (annemarie.mahfouf AT free DOT fr) if you need further information.
When you send me the files, please don't forget to mention any special characters used in your language (put them in a text file, one per line and add this file in the tarball) and please mention any other specificity.
Please never commit files in a BRANCH as it might break the game.
Good luck and thanks!
Last update: October 23rd 2004
|