moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / doc / khangman / index.docbook
bloba4287ec3be809737e381214f567e613c27d86fcc
1 <?xml version="1.0" ?>
2 <!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN"
3 "dtd/kdex.dtd" [
4 <!ENTITY kapp "&khangman;">
5 <!ENTITY package "kdeedu">
6 <!ENTITY % addindex "IGNORE">
7 <!ENTITY % English "INCLUDE"><!-- change language only here -->
8 ]>
10 <book lang="&language;">
12 <bookinfo>
13 <title>The &khangman; Handbook</title>
15 <authorgroup>
16 <author>
17 <firstname>Anne-Marie</firstname>
18 <othername></othername>
19 <surname>Mahfouf</surname>
20 <affiliation>
21 <address><email>annma@kde.org</email></address>
22 </affiliation>
23 </author>
24 </authorgroup>
27 <copyright>
28 <year>2001</year><year>2003</year>
29 <holder>Anne-Marie Mahfouf</holder>
30 </copyright>
32 <legalnotice>&FDLNotice;</legalnotice>
35 <date>2004-04-22</date>
36 <releaseinfo>1.5</releaseinfo>
38 <abstract>
39 <para>
40 &khangman; is the classic hangman game for children, adapted for &kde;.
41 </para>
42 </abstract>
44 <keywordset>
45 <keyword>KDE</keyword>
46 <keyword>kdeedu</keyword>
47 <keyword>KHangMan</keyword>
48 <keyword>hangman</keyword>
49 <keyword>game</keyword>
50 <keyword>child</keyword>
51 <keyword>words</keyword>
52 </keywordset>
54 </bookinfo>
56 <chapter id="introduction">
57 <title>Introduction</title>
59 <para>
60 &khangman; is a game based on the well-known hangman game. It is aimed for
61 children aged 6+. The game has four levels of difficulty: Animals (animals
62 words), Easy, Medium and Hard. A word is picked in random, the letters are
63 hidden, and you must guess the word by trying one letter after another. Each
64 time you guess a wrong letter, part of a picture of a hangman is drawn. You
65 must guess the word before being hanged! You have 10 tries.
66 </para>
68 </chapter>
70 <chapter id="using-khangman">
71 <title>Using &khangman;</title>
73 <screenshot>
74 <screeninfo>Here's a screenshot of &khangman; when you start it for the first time</screeninfo>
75 <mediaobject>
76 <imageobject>
77 <imagedata fileref="khangman1.png" format="PNG"/>
78 </imageobject>
79 <textobject>
80 <phrase>&khangman; screenshot</phrase>
81 </textobject>
82 </mediaobject>
83 </screenshot>
85 <para>
86 Here you can see &khangman; as it is the first time you run it. Level is Animals,
87 language is default (English here, the default is your current KDE language), there is no background theme and the hangman pictures are not transparent. Any changes in level, language or
88 background mode are written in the configuration file and restored in your next
89 game.
90 </para>
92 <para>
93 Please note how easy it is to change the level and the background mode, just
94 click on the combo boxes on the toolbar. Getting a new word and quitting the
95 game are also easily done by clicking on the corresponding buttons on the
96 toolbar.
97 </para>
99 <sect1 id="general-usage">
100 <title>General usage</title>
102 <!-- FIXME: A word can't really be displayed and hidden at the same time, -->
103 <!-- although I can't think of a better way to phrase this -->
104 <para>A word is displayed and its letters are hidden. You know how many letters there are in the
105 word. You have to guess the word by trying one letter after another. You enter the letter in the text box and you either press the Enter key or click on the Guess button to see if the letter belongs or not to the word. </para>
107 <para>The word
108 is picked at random and it is not the same as the previous word.
109 </para>
111 <important><para>All words are nouns (no verbs, no adjectives, &etc;).</para></important>
113 <para>
114 Usually, it is not important whether you type in lowercase or uppercase. The program
115 converts all input into lowercase except for German words which begin with an
116 uppercase letter. The program does that automatically.
117 </para>
119 <para>
120 The current level and current language are displayed in the statusbar.
121 </para>
123 <para>
124 Each time you guess a letter that is not in the word, another part of the
125 hangman is drawn. You have 10 tries to guess the word. After that, the correct
126 answer is displayed.
127 </para>
129 <para>
130 There are 4 levels: easy, medium, hard and animals, plus levels for other
131 topics in some languages. The program scans for all data files in all
132 languages.
133 </para>
135 <para>
136 In the easy level, the words are quite simple and related to everyday life. It
137 is suitable for children from 6 to 9. The animals level contains only names of
138 animals so they are easier to find. Some of them are easy, others are more
139 difficult. In the medium level, the words are longer and more difficult. It is
140 suitable for ages 9+. The hard level is just that, hard, &ie; the words are
141 difficult to spell and not very well known. This level is challenging, even for
142 adults.
143 </para>
145 <para>After a word is guessed (or the hangman is completed), you are
146 prompted for another word and you can either use the
147 <keycap>Y</keycap> or <keycap>N</keycap> keys or the mouse to answer
148 yes or no. If you say <guilabel>No</guilabel>, the game quits. If you
149 say <guilabel>Yes</guilabel>, another word is ready to be guessed.
150 </para>
152 <para>You type the letter you want to try in the text box (the mouse cursor is
153 ready in the text box) and you hit the &Enter; key. If the letter belongs to the
154 word, it takes its place, as many times as it appears in the word. If the
155 letter does not belong to the word, it goes in the Misses field and a further
156 part of the hangman is drawn on the right. You have ten tries and after that
157 you lose and the correct word is displayed.
158 </para>
160 <para>During the game, you can choose to start a new game by going in the
161 <guimenu>Game</guimenu> menu and choosing <guimenuitem>New</guimenuitem> or
162 clicking on the <guiicon>New</guiicon> icon on the toolbar. You can also change
163 the level with the level button on the toolbar (this will bring you a new word
164 for the new level).</para>
166 <para>
167 Future improvement (in KDE 4) will allow you to create your own words file or to load a file different from the four included ones.
168 </para>
169 </sect1>
171 <sect1 id="languages">
172 <title>Playing in different languages</title>
173 <para>
174 You can play &khangman; in twenty-two languages: Brazilian Portuguese, Bulgarian, Catalan, Czech, Danish, Dutch, English,
175 Finnish, French, German, Hungarian, Irish (Gaelic), Italian, Norwegian (Bokm&#229;l), Norwegian (Nynorsk), Portuguese, Spanish, Serbian (Latin and Cyrillic), Slovenian, Tajik and Swedish.
176 </para>
178 <para>
179 By default, after the first installation of &khangman; for KDE 3.3, only English and your &kde; language if it is one of the above and if you have the corresponding kde-i18n package will be installed. For example if you are a Danish user and if you have &kde; in Danish, &khangman; and in <guimenu>Settings</guimenu> <guimenuitem>Configure &khangman;..</guimenuitem> <guimenuitem>Advanced Settings</guimenuitem> <guimenuitem>Words are in:</guimenuitem> you will see two items: English and Danish and Danish will be the default.
180 </para>
182 <para>
183 You can still play &khangman; in other languages. It is very easy to add new data in &khangman;. All you need is a working internet connection.
184 You click on the <guimenu>File</guimenu> menu and then on <guimenu>Get data in a new language...</guimenu>. A dialog appears, similar to this one:
185 </para>
187 <screenshot>
188 <screeninfo>The Get Hot New Stuff dialog for &khangman;</screeninfo>
189 <mediaobject>
190 <imageobject>
191 <imagedata fileref="getnewstuff.png" format="PNG"/>
192 </imageobject>
193 <textobject>
194 <phrase>Get Hot New Stuff screenshot</phrase>
195 </textobject>
196 </mediaobject>
197 </screenshot>
199 <para>
200 Click on the language name you want to install and then on the Install button. A dialog will tell you when the language is installed by displaying: Successfully installed hot new stuff. You click on OK to close this information dialog then on Close to close the Get New Stuff dialog (if you want another language, you get repeat these steps). The new language is now available!
201 </para>
203 <para>
204 You can then easily change the language by going in the <guimenu>Settings</guimenu> <guimenuitem>Configure &khangman;...</guimenuitem> <guimenuitem>Advanced Settings</guimenuitem> <guimenuitem>Words are in:</guimenuitem> and choosing another language.
205 </para>
207 <para>
208 Please note that you can now type the special characters in a language by displaying the <interface>Special Characters Toolbar</interface>.
209 This toolbar holds buttons with an icon of each special character per language like &eacute; in French for example. Clicking on such a
210 button will write the corresponding letter in the input line and you validate your choice with Enter. You can of course also use the keyboard layout corresponding to the language. This toolbar can be shown or hidden. The setting is restored next time you play &khangman;.
211 </para>
213 <important><para>
214 Please note that you need Arial and URW Bookman fonts in order to correctly display the special characters in some languages. Provided you have those fonts installed, &khangman; will automatically use them. If you see small rectangles instead of letters, then you migh miss one of these fonts.
215 </para></important>
217 </sect1>
218 <sect1 id="few-tips">
219 <title>A few tips</title>
220 <para>
221 Try to guess the vowels first. Then have a go with the most common consonants:
222 l, t, r, n, s
223 </para>
224 <para>
225 When you see <quote>io</quote>, try n after that, in French and English.
226 </para>
227 <para>
228 In Brazilian Portuguese, Catalan, Spanish and Portuguese, the accented
229 vowels can be discovered when you type the non accented corresponding
230 vowel. For example, all the accented <quote>a</quote> are displayed in
231 the word when you type <quote>a</quote>. This is when
232 <menuchoice><guimenu>Settings</guimenu><guimenuitem>Configure &khangman;</guimenuitem> <guimenuitem>Advanced Settings</guimenuitem> <guimenuitem>Type Accented
233 Letters</guimenuitem></menuchoice> is not checked. When
234 <guimenuitem>Type Accented
235 Letters</guimenuitem> is checked, then you have to type
236 the accented letters yourself. When you type <quote>a</quote>, only
237 <quote>a</quote> is displayed and you have to type for example
238 &atilde; for this letter to be displayed.
239 </para>
240 <para>
241 Did you know? In English, the most common letter is e (12.7%), followed by t
242 (9.1%) then a (8.2%), i (7.0%) and n (6.7%).
243 </para>
244 </sect1>
247 </chapter>
249 <chapter id="menus">
250 <title>Menubar and toolbars</title>
252 <sect1 id="mainwindow">
253 <title>The Main &khangman; Window</title>
255 <para>The <guimenu>Game</guimenu> menu has 3 items:
256 <guimenuitem>New</guimenuitem>, <guimenuitem>Get data in a new language</guimenuitem> and
257 <guimenuitem>Quit</guimenuitem>.</para>
259 <para><guimenuitem>New</guimenuitem> brings you a new game, &ie; a new
260 word to guess, in the same level you already
261 are. <guimenuitem>Get data in a new language</guimenuitem> will display the Get New Stuff dialog to allow you to download data in a new language. <guimenuitem>Quit</guimenuitem> quits the game by closing the
262 main window and writing the actual settings in the configuration
263 file.</para>
265 <para>
266 The <guimenu>Levels</guimenu> menu allows you to choose the level, &ie; the difficulty of the word to guess.
267 </para>
268 <para>
269 The <guimenuitem>Settings</guimenuitem> menu allows you to configure
270 &khangman; easily. First, <guimenuitem>Toolbars</guimenuitem> and
271 <guimenuitem>Show Statusbar</guimenuitem> give you the possibility to
272 hide/show the toolbars and statusbar.
273 </para>
275 <para>There are two toolbars: the main one which is the one on top
276 with the buttons and combo boxes and the
277 <interface>Characters</interface> toolbar which, when it is shown, is
278 on the bottom. This toolbar has buttons with the special characters
279 for each language: accented letters and other special characters. This
280 allows users to easily play in another language without having to configure
281 a new keyboard layout. You click on a special letter and it is
282 displayed as the letter to try. Pressing &Enter; will make the program
283 see if the letter is present in the word or not. The toolbar can be
284 hidden if you don't want it. This is saved in the configuration file
285 so if the toolbar is hidden, it will be hidden next time you run
286 &khangman;.
287 </para>
288 <tip>
289 <para>
290 It is of course possible to move the toolbars around. Put the mouse
291 cursor on the small handle on the left of the toolbar, press the &LMB;
292 and drag the toolbar to position it on the screen where you want
293 it. If you point the mouse on one of the toolbars and press the right
294 mouse button, a context menu appears to let you choose different
295 options for the toolbar.
296 </para>
297 </tip>
298 <para>
299 <guimenuitem>Configure Shortcuts...</guimenuitem> is a standard &kde; setting that allows you to
300 choose different shortcut keys for different actions. For example,
301 <keycombo action="simul">&Ctrl;<keycap>Q</keycap></keycombo> is the
302 standard shortcut for <guimenuitem>Quit</guimenuitem>.</para>
303 <para><guimenuitem>Configure Toolbars...</guimenuitem> is also a
304 standard &kde; menu item that allows you to add or suppress items from
305 the toolbar. When <guimenuitem>Full-Screen Mode</guimenuitem> is
306 checked, it brings you in full-screen mode, with only the toolbar on
307 top and &khangman; occupies the whole screen. On the main toolbar, the
308 icon <guiicon>Back to Normal Size</guiicon> allows you to come back
309 from full-screen mode to the window size you had before.</para>
311 <screenshot>
312 <screeninfo>&khangman; blue theme</screeninfo>
313 <mediaobject>
314 <imageobject>
315 <imagedata fileref="khangman2.png" format="PNG"/>
316 </imageobject>
317 <textobject>
318 <phrase>&khangman; blue theme</phrase>
319 </textobject>
320 </mediaobject>
321 </screenshot>
323 <para> Here you have &khangman; with the Blue theme, transparent
324 hangman pictures, Catalan language and level Easy. The
325 <interface>Characters</interface> toolbar is shown here.</para>
327 <para>The level is chosen with a combo box in the toolbar or via the <guimenu>Levels</guimenu> menu in the menubar. The available levels are easy, medium, animals and hard. Easy is related to common objects a child aged six
328 or seven knows. Medium regards nouns a bit more challenging, hard is
329 quite difficult and animals is only animals nouns. </para>
331 <para> All words are nouns. No verbs, no adjectives. The chosen level
332 is then displayed on the statusbar.</para>
333 <para>Only letters are allowed to be typed in the text box.</para>
334 </sect1>
336 <sect1 id="settings">
337 <title>Available Settings</title>
338 <para>
339 A toolbar is provided for quick access to some settings. You can click on a button to have a new game (i.e. a new word), to quit the game and to have full-screen mode (provided for low resolution screens and to play with several people). This user manual also will open if you click on the &khangman; handbook icon. The level and the background are easily changed via 2 combo boxes on the toolbar.
340 </para>
341 <para>
342 In <guimenu>Settings</guimenu>, <guimenu>Configure &khangman;</guimenu> you will find two tabs. The first one is for Look And Feel.
343 </para>
345 <sect2 id="normal-settings">
346 <title>Look And Feel</title>
348 <screenshot>
349 <screeninfo>&khangman; normal settings</screeninfo>
350 <mediaobject>
351 <imageobject>
352 <imagedata fileref="normalsettings.png" format="PNG"/>
353 </imageobject>
354 <textobject>
355 <phrase>&khangman; normal settings</phrase>
356 </textobject>
357 </mediaobject>
358 </screenshot>
360 <para>The HangMan Pictures section gives you the choice of having the hangman pictures <guimenuitem>Mild</guimenuitem> or <guimenuitem>Normal</guimenuitem>. <guimenuitem>Mild</guimenuitem> gives you the choice of having the last of the hangman pictures milder. Milder pictures mean that the man is not hanged but he is holding the rope with his hand. This is more suitable for younger children and is the default. If you choose <guimenuitem>Normal</guimenuitem>, the man is hanged by the neck.
361 </para>
363 <para>You can also set the background picture. <guimenu>No background</guimenu> leaves everything gray while if you check <guimenu>Blue theme</guimenu> or <guimenu>Nature theme</guimenu>, you will have a nice background pictures.
364 </para>
366 <para>
367 In the Sounds section, if you check <guimenu>Enable sounds</guimenu> then a sound will be played on new game and another sound will be played when you win a game.
368 </para>
370 </sect2>
371 <sect2 id="advanced-settings">
372 <title>Advanced Settings</title>
374 <screenshot>
375 <screeninfo>&khangman; advanced settings</screeninfo>
376 <mediaobject>
377 <imageobject>
378 <imagedata fileref="advancedsettings.png" format="PNG"/>
379 </imageobject>
380 <textobject>
381 <phrase>&khangman; advanced settings</phrase>
382 </textobject>
383 </mediaobject>
384 </screenshot>
386 <para>
387 The second tab deals with more advanced settings. Some settings are only available for a few languages and if not available in the language you are currently playing, these settings will then be disabled.
388 </para>
390 <para>The first setting let you choose the language for the words. This language will be your KDE language by default if available. Otherwise it will be English. English is shipped for everyone and all other data is shipped in the corresponding i18n module. Additionally you can download new languages using the <guimenu>Game</guimenu> <guimenuitem>Get Data in New Language...</guimenuitem> menu.
391 </para>
393 <para><guimenu>Type Accented Letters</guimenu> is available for Brazilian Portuguese, Catalan, Portuguese and Spanish. If you check <guimenu> Type Accented Letters</guimenu> then you will have to type all accented vowels (like &atilde;). If this remains unchecked, when you type any vowel, all accented vowels will be displayed as well.
394 </para>
396 <para>
397 Some languages also have hints to help you guess the word. The hint is shown by a right-click and gives a short definition of the word to guess. If this setting is enabled and if you check the option <guimenu>Show hints</guimenu>, you can &RMB; click anywhere on the game and get a hint shown for four seconds. This hint should help you to guess the word more easily.
398 </para>
400 <para>
401 If it is checked, <guimenu>Require more guesses for duplicate letters</guimenu> will display only the first hidden instance of a letter if there are several same letters in the word. For example, if the word is 'potato' and you type 'o', then only the first 'o' will be displayed. You will have to type 'o' again to display the second instance of 'o' and a third 'o' will go to the missed letters. This increases the difficulty.
402 </para>
404 <para>
405 If you check <guimenu>Do not display the "Congratulations! You Won" dialog</guimenu> then this dialog will not be shown when you win a game. Instead the word will be displayed for 4 seconds and a new game will then immediately start.
406 </para>
408 </sect2>
409 </sect1>
411 </chapter>
413 <chapter id="commands">
414 <title>Command Reference</title>
416 <sect1 id="khangman-mainwindow">
417 <title>Menus and shortcut keys</title>
419 <sect2>
420 <title>The <guimenu>Game</guimenu> Menu</title>
422 <variablelist>
423 <varlistentry>
424 <term><menuchoice>
425 <shortcut>
426 <keycombo action="simul">&Ctrl;<keycap>N</keycap></keycombo>
427 </shortcut>
428 <guimenu>Game</guimenu>
429 <guimenuitem>New</guimenuitem>
430 </menuchoice></term>
431 <listitem><para><action>New</action> game (&ie; new word)</para></listitem>
432 </varlistentry>
433 <varlistentry>
434 <term><menuchoice>
435 <shortcut>
436 <keycombo action="simul">&Ctrl;<keycap>G</keycap></keycombo>
437 </shortcut>
438 <guimenu>Game</guimenu>
439 <guimenuitem>Get data in a new language...</guimenuitem>
440 </menuchoice></term>
441 <listitem><para><action>Display</action> the KNewStuff dialog which lists all the data available in the different languages. </para></listitem>
442 </varlistentry>
443 <varlistentry>
444 <term><menuchoice>
445 <shortcut>
446 <keycombo action="simul">&Ctrl;<keycap>Q</keycap></keycombo>
447 </shortcut>
448 <guimenu>Game</guimenu>
449 <guimenuitem>Quit</guimenuitem>
450 </menuchoice></term>
451 <listitem><para><action>Quits</action> &khangman;</para></listitem>
452 </varlistentry>
453 </variablelist>
455 </sect2>
457 <sect2>
458 <title>The <guimenu>Levels</guimenu> Menu</title>
460 <variablelist>
461 <varlistentry>
462 <term><menuchoice>
463 <guimenu>Levels</guimenu>
464 <guimenuitem>Animals</guimenuitem>
465 </menuchoice></term>
466 <listitem><para><action>Choose</action> the list of animals words to guess</para></listitem>
467 </varlistentry>
468 <varlistentry>
469 <term><menuchoice>
470 <guimenu>Levels</guimenu>
471 <guimenuitem>Easy</guimenuitem>
472 </menuchoice></term>
473 <listitem><para><action>Choose</action> the list of easy words to guess</para></listitem>
474 </varlistentry>
475 <varlistentry>
476 <term><menuchoice>
477 <guimenu>Levels</guimenu>
478 <guimenuitem>Medium</guimenuitem>
479 </menuchoice></term>
480 <listitem><para><action>Choose</action> the list of medium difficulty words to guess</para></listitem>
481 </varlistentry>
482 <varlistentry>
483 <term><menuchoice>
484 <guimenu>Levels</guimenu>
485 <guimenuitem>Hard</guimenuitem>
486 </menuchoice></term>
487 <listitem><para><action>Choose</action> the list of difficult words to guess</para></listitem>
488 </varlistentry>
489 </variablelist>
491 </sect2>
493 <sect2>
494 <title>The <guimenu>Settings</guimenu> Menu</title>
496 <variablelist>
497 <varlistentry>
498 <term><menuchoice>
499 <guimenu>Settings</guimenu>
500 <guimenuitem>Toolbars</guimenuitem>
501 <guimenuitem>Show Main</guimenuitem>
502 </menuchoice></term>
503 <listitem><para><action>Toggle</action> the Main Toolbar</para></listitem>
504 </varlistentry>
505 <varlistentry>
506 <term><menuchoice>
507 <guimenu>Settings</guimenu>
508 <guimenuitem>Toolbars</guimenuitem>
509 <guimenuitem>Show Characters</guimenuitem>
510 </menuchoice></term>
511 <listitem><para><action>Toggle</action> the Characters Toolbar</para></listitem>
512 </varlistentry>
513 <varlistentry>
514 <term><menuchoice>
516 <guimenu>Settings</guimenu>
517 <guimenuitem>Show Statusbar</guimenuitem>
518 </menuchoice></term>
519 <listitem><para><action>Toggle</action> the statusbar</para></listitem>
520 </varlistentry>
522 <varlistentry>
523 <term><menuchoice>
524 <shortcut>
525 <keycombo action="simul">&Ctrl;&Shift;<keycap>F</keycap></keycombo>
526 </shortcut>
527 <guimenu>Settings</guimenu>
528 <guimenuitem>Full-Screen Mode</guimenuitem>
529 </menuchoice></term>
530 <listitem><para><action>Toggle</action> the full-screen mode
531 </para></listitem>
532 </varlistentry>
533 <varlistentry>
534 <term><menuchoice>
535 <guimenu>Settings</guimenu>
536 <guimenuitem>Configure Shortcuts...</guimenuitem>
537 </menuchoice></term>
538 <listitem><para><action>Configure</action> the keyboard keys you use to access the different actions.</para>
539 </listitem>
540 </varlistentry>
542 <varlistentry>
543 <term><menuchoice>
544 <guimenu>Settings</guimenu>
545 <guimenuitem>Configure Toolbars...</guimenuitem>
546 </menuchoice></term>
547 <listitem><para><action>Configure</action> the items you want to put in the toolbar
548 </para></listitem>
549 </varlistentry>
551 <varlistentry>
552 <term><menuchoice>
553 <guimenu>Settings</guimenu>
554 <guimenuitem>Configure &khangman;...</guimenuitem>
555 </menuchoice></term>
556 <listitem><para><action>Display</action> the &khangman; settings dialog
557 </para></listitem>
558 </varlistentry>
560 </variablelist>
562 </sect2>
564 <sect2>
565 <title>The <guimenu>Help</guimenu> Menu</title>
566 &help.menu.documentation;
567 </sect2>
568 </sect1>
569 </chapter>
571 <chapter id="developers">
572 <title>Developer's Guide to &khangman;</title>
574 <sect1 id="changing-words">
575 <title>How to add words in a new language for the game</title>
577 <para>Thanks to Stefan Asserhäll, it is very easy to add a new language
578 directly to the game. The procedure described here can also be
579 found in the <filename class="directory">khangman</filename> source folder
580 in the file <filename>README.languages</filename>. Please follow the procedure and then send me the files tarred and gzipped to annemarie.mahfouf@free.fr.
581 </para>
582 <para>
583 The twenty four available languages so far by code are: bg ca cs da de en es fr fi ga hu it nb nl nn pt pt_BR ru sl sr sr@Ltn sv tg and tr. If your language code is not among those, you can proceed further.
584 </para>
585 <para>Most of this data should be completed to include <emphasis>hints</emphasis>, please see below. Complete data: bg fr en it only have hints so the other above languages must be updated as soon as possible.
586 </para>
587 <para>Be sure you are working with the latest cvs HEAD sources of KHangMan by issuing a
588 <screen><userinput><command>
589 cvs up -dPA khangman
590 </command></userinput></screen>
591 in the kdeedu module. Then
592 <screen><userinput><command>
593 cd kdeedu/khangman
594 </command></userinput></screen>
595 </para>
596 <para>The words are stored in 4 separate files, one for each level. The files are in
597 <filename class="directory">/khangman/data/en</filename>. The file
598 <filename>easy.txt</filename> is for level easy, the file
599 <filename>medium.txt</filename> is for level medium, the file
600 <filename>animals.txt</filename> is for level animals and the file
601 <filename>hard.txt</filename> is for level hard.</para>
602 <para>English is the default and thus the only language to be shipped with &khangman;. All other languages data are put in the correct kde-i18n.
603 </para>
604 <procedure>
605 <step><para>Enter the following commands in a &konsole; to create the folder
606 and files for the new language:</para>
607 <!-- Do not wrap or indent the next line, it's white space sensitive -->
608 <screen><userinput><command>./add_language <replaceable>language_code</replaceable></command></userinput></screen>
609 <para>Here you must replace <replaceable>language_code</replaceable>
610 with your language code.</para>
611 </step>
612 <step>
613 <para>The files now use the kvtml format. The tag <sgmltag class="starttag">o</sgmltag> is for the word and the tag <sgmltag class="starttag">t</sgmltag> 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! </para>
614 <para>An example of a kvtml file is as follow:</para>
615 <programlisting><markup>
616 &lt;?xml version="1.0"?&gt;
617 &lt;!DOCTYPE kvtml SYSTEM "kvoctrain.dtd"&gt;
618 &lt;kvtml&gt;
619 &lt;e&gt;
620 &lt;o&gt;cane&lt;/o&gt;
621 &lt;t&gt;&egrave; il tuo animale domestico preferito&lt;/t&gt;
622 &lt;/e&gt;
625 &lt;/kvtml&gt;
626 </markup></programlisting>
627 </step>
628 <step>
629 <para>Edit all indicated text files in the new directory with a text editor,
630 and replace each word inside the <sgmltag class="starttag">o</sgmltag> tag with a translated word and each hint inside a <sgmltag class="starttag">t</sgmltag> with a translated hint. It is not really important
631 that the exact meaning is preserved, but try to keep the length and
632 level of difficulty roughly the same.
633 You can include words with white space or - in them, in that case the white space or the -
634 will be shown instead of the _.
635 Please contact Anne-Marie Mahfouf <email>annemarie DOT mahfouf AT free DOT fr</email> if there is anything special related to your language so I can adapt the code to it (especially the special and accented characters).</para>
637 <para>You can just translate the words but you can also adapt them
638 following the level and add new words if you want. For example,
639 <quote>table</quote> is in level easy in English but in your language,
640 it can be level medium. Feel free to adapt the files to your language
641 needs. The number of words in a file is not important, you can add
642 some if you want.</para>
644 <para>Remember that all words are nouns.</para>
646 <para> Note that you must use <emphasis role="bold">UTF-8 encoding</emphasis> when editing the
647 files. If your editor cannot do this, try using &kwrite; or &kate;. When
648 opening a file in &kwrite; or &kate; you can select utf8 encoding with
649 the combo box at the top of the file open dialog.</para>
651 <para>Please keep the actual English filenames in your
652 <replaceable>language_code</replaceable> dir.</para>
653 </step>
655 <step>
656 <para>Enter the following command to install the new data files:</para>
657 <screen><userinput><command>make</command></userinput>
658 <userinput><command>make install</command></userinput></screen>
660 <para>You may have to become <systemitem
661 class="username">root</systemitem> to run <command>make
662 install</command>, depending on your installation.</para>
663 </step>
664 <step>
665 <para>Run the game and check that your language has been added:</para>
666 <screen><userinput><command>khangman</command></userinput></screen>
667 </step>
668 <step><para>Instead of committing your files, please sent them to Anne-Marie Mahfouf <email>annemarie DOT mahfouf AT free DOT fr</email> tarred and gzipped. As there are now twenty three languages, a wizard (KNewStuff) 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 kdeedu module and it will also be done in KLettres, KStars and maybe KTouch.
669 Please contact Anne-Marie by email if you need further information.</para>
670 <para>When you send me the files, please don't forget to mention any <emphasis role="bold">special characters</emphasis> 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.</para>
671 <para><emphasis>Please never commit files in a BRANCH as it might break the game.</emphasis></para>
672 </step>
673 </procedure>
674 <para>Many thanks for your contribution!</para>
675 </sect1>
677 <sect1 id="internal">
678 <title>What is stored by &khangman; and where</title>
679 <para>
680 When you get a new language via <guimenu>Game </guimenu> -> <guimenu>Get Data in New Language ...</guimenu>, the new language data is stored in <filename
681 class="directory">$~/.kde/share/apps/khangman/data</filename> in the language code folder. The available language dir names are also stored in the &khangman; config file in <filename>~/.kde/share/config/khangmanrc</filename>.
682 </para>
683 <para>
684 The provider name (i.e. the address of the website where to download the new languages) is stored in <filename>$KDEDIR/share/apps/khangman/khangmanrc</filename>.
685 </para>
686 <para>
687 The English language (default) and the user language from his i18n package(s) (if available) are stored in <filename class="directory">$KDEDIR/share/apps/khangman</filename>.
688 </para>
689 <para>
690 In the configuration file, stored for each user in his <filename>~/.kde/share/config/khangmanrc</filename> are saved all the game settings such as the background, last level played, ... plus the files that were downloaded from the KNewStuff dialog.
691 </para>
692 </sect1>
693 <sect1 id="planned-features">
694 <title>Planned Features for &khangman;</title>
695 <para>
696 A planned feature is of course to have more language data and also hints in every language. You can help for this in your own language if it is not done yet. Please contact me if you want to help with this, it's just a matter of translating the English words to your language (see <link linkend="changing-words">How to add words in a new language for the game</link>).
697 </para>
698 <para>
699 What can also be done is to use other kvtml files like the ones that are on the
700 KDE-Edu website to play &khangman;. For example, imagine you can play the
701 capitals of the world, the hint will tell you the country and you have to guess
702 the capital. Or learn words in another language, the hint is the word in your
703 language, the word to guess is the translation in the new language.
704 </para>
705 </sect1>
706 </chapter>
708 <chapter id="faq">
709 <title>Questions and Answers</title>
711 &reporting.bugs;
712 &updating.documentation;
714 <qandaset id="faqlist">
715 <qandaentry>
716 <question>
717 <para>I have an error message telling me the pictures cannot be found.</para>
718 </question>
719 <answer>
720 <para>The game installs by default in <filename
721 class="directory">/usr/local/kde</filename> so add <filename
722 class="directory">/usr/local/kde/bin</filename> to your path and set
723 the <envar>KDEDIR</envar> variable to <filename
724 class="directory">/usr/local/kde</filename> before running the
725 game. An easy way is to configure &khangman; with the option
726 <option>--prefix</option>=$<envar>KDEDIR</envar> where
727 $<envar>KDEDIR</envar> is where the rest of &kde; is installed. This
728 could vary widely, depending on the distribution and operating system
729 you.</para>
730 </answer>
731 </qandaentry>
732 <qandaentry>
733 <question>
734 <para>&khangman; does not start correctly after I upgraded to one of
735 the &kde; 3.3 versions</para>
736 </question>
737 <answer>
738 <para>
739 There might be a problem due to the change of the configuration file. Please remove the <filename>khangmanrc</filename> file in your <filename class="directory">$HOME/.kde/share/config</filename> folder.
740 </para>
741 </answer>
742 </qandaentry>
743 </qandaset>
744 </chapter>
746 <chapter id="credits">
748 <title>Credits and License</title>
750 <para>
751 &khangman;
752 </para>
753 <para>
754 Program copyright 2001-2004 Anne-Marie Mahfouf <email>annma AT kde DOT org</email>
755 </para>
756 <para>
757 Contributors:
758 <itemizedlist>
759 <listitem><para>Hangman graphics: Renaud Blanchard
760 <email>kisukuma AT chez DOT com</email></para> </listitem>
761 <listitem><para>Sounds: Ludovic Grossard
762 <email>ludovic.grossard AT libertysurf DOT fr</email></para> </listitem>
763 <listitem><para>Blue theme, icons and code: Primoz Anzur
764 <email>zerokode AT yahoo DOT com</email></para> </listitem>
765 <listitem><para>Swedish data files, coding help, transparent pictures and i18n fixes: Stefan Asserhäll
766 <email>stefan DOT asserhall AT telia DOT com
767 </email></para> </listitem>
768 <listitem><para>Nature theme: Joe Bolin
769 <email>jbolin AT users DOT sourceforge DOT net</email></para> </listitem>
770 <listitem><para>Softer Hangman Pictures: Matt Howe
771 <email>mdhowe AT bigfoot DOT com</email></para> </listitem>
772 <listitem><para>Spanish data files: eXParTaKus
773 <email>expartakus AT expartakus DOT com
774 </email></para> </listitem>
775 <listitem><para>Spanish data hints: Rafael Beccar
776 <email>rafael DOT beccar AT kdemail DOT net
777 </email></para> </listitem>
778 <listitem><para>Danish data files: Erik Kjaer Pedersen
779 <email>erik AT mpim-bonn DOT mpg DOT de
780 </email></para> </listitem>
781 <listitem><para>Finnish data files: Niko Lewman
782 <email>niko DOT lewman AT edu DOT hel DOT fi
783 </email></para> </listitem>
784 <listitem><para>Brazilian Portuguese data files: João Sebastião de Oliveira Bueno
785 <email>gwidion AT mpc DOT com DOT br
786 </email></para> </listitem>
787 <listitem><para>Catalan data files: Antoni Bella
788 <email>bella5 AT teleline DOT es
789 </email></para> </listitem>
790 <listitem><para>Italian data files: Giovanni Venturi
791 <email>jumpyj AT tiscali DOT it
792 </email></para> </listitem>
793 <listitem><para>Dutch data files: Rinse
794 <email>rinse AT kde DOT nl
795 </email></para> </listitem>
796 <listitem><para>Portuguese data files: Pedro Morais
797 <email>morais AT kde DOT org
798 </email></para> </listitem>
799 <listitem><para>Serbian (Cyrillic and Latin) data files: Chusslove Illich
800 <email>chaslav AT sezampro DOT yu
801 </email></para> </listitem>
802 <listitem><para>Slovenian data files: Jure Repinc
803 <email>jlp AT holodeck1 DOT com
804 </email></para> </listitem>
805 <listitem><para>Czech data files: Luk&aacute;&scaron; Tinkl
806 <email>lukas AT kde DOT org
807 </email></para> </listitem>
808 <listitem><para>Tajik data files: Roger Kovacs
809 <email>rkovacs AT khujand DOT org
810 </email></para> </listitem>
811 <listitem><para>Norwegian (Bokm&#229;l) data files: Torger &#197;ge Sinnes
812 <email>torg-a-s AT online DOT no
813 </email></para> </listitem>
814 <listitem><para>Hungarian data files: Tamas Szanto
815 <email>tszanto AT mol DOT hu
816 </email></para> </listitem>
817 <listitem><para>Norwegian (Nynorsk) data files: Gaute Hvoslef Kvalnes
818 <email>gaute AT verdsveven DOT com
819 </email></para> </listitem>
820 <listitem><para>Turkish data files: Mehmet &Ouml;zel
821 <email>mehmet_ozel2003 AT hotmail DOT com
822 </email></para> </listitem>
823 <listitem><para>Bulgarian data files: Radostin Radnev
824 <email>radnev AT yahoo DOT com
825 </email></para> </listitem>
826 <listitem><para>Irish (Gaelic) data files: Kevin Patrick Scannell
827 <email>scannell AT slu DOT edu
828 </email></para> </listitem>
830 <listitem><para>Coding help: Robert Gogolok
831 <email>robertgogolok AT gmx DOT de</email></para> </listitem>
832 <listitem><para>Coding help: Benjamin Meyer
833 <email>ben AT meyerhome DOT net</email></para> </listitem>
834 <listitem><para>Code fixes: Lubos Lun&agrave;k
835 <email>l.lunak AT kde DOT org</email></para> </listitem>
836 <listitem><para>Code fixes: Albert Astals Cid
837 <email>tsdgeos AT terra DOT es</email></para> </listitem>
838 <listitem><para>Usability study: Celeste Paul
839 <email>seele AT obso1337 DOT org</email></para> </listitem>
840 </itemizedlist>
841 </para>
843 <para>
844 Documentation copyright 2001-2004 Anne-Marie Mahfouf <email>annma AT kde DOT org</email>
845 </para>
848 &underFDL; <!-- FDL: do not remove -->
849 &underGPL; <!-- GPL License -->
851 </chapter>
853 <appendix id="installation">
854 <title>Installation</title>
856 <sect1 id="getting-khangman">
857 <title>How to obtain &khangman;</title>
859 &install.intro.documentation;
861 </sect1>
863 <sect1 id="compilation">
864 <title>Compilation and installation</title>
866 &install.compile.documentation;
868 </sect1>
869 </appendix>
871 &documentation.index;
872 </book>
873 <!--
874 Local Variables:
875 mode: sgml
876 sgml-minimize-attributes: nil
877 sgml-general-insert-case: lower
878 sgml-indent-step:0
879 sgml-indent-data:nil
880 End: