DoudouLinux DoudouLinux

The computer they prefer!

DoudouLinux DoudouLinux

The computer they prefer!

The site's languages [ar] [cs] [de] [en] [es] [fa] [fr] [it] [ms] [nl] [pt] [pt_br] [ro] [ru] [sr] [sr@latin] [th] [uk] [vi] [zh]

> English > Contribute > Translate DoudouLinux > Translating applications > HowTo add a new language to KLettres 1.5.1

HowTo add a new language to KLettres 1.5.1

February 2011

Here is a an outline of what to do if you want to add your own language to KLettres. Please keep in mind that KLettres is meant to help learning the alphabet and the more useful syllables in your language. Maybe some letters of the alphabet are never pronounced so you can remove those.

You will need 2 sets of sounds, one for the alphabet and one for the syllables, one file with the data, and one file with the special characters in your language, if there are any.

1- Recording the Sounds

Put each sound in a file, wav, ogg or mp3. ogg is better as it’s free (versus mp3) the alphabet sounds can be stored as a-0.ogg, a-1.ogg, etc. or a.ogg, b.ogg etc. the syllables sounds can be stored as ad-0.ogg, ad-1.ogg and so on or ba.ogg, bi.ogg, etc.., but use only lower ascii characters for the file names. Each sound needs to be 1.5 to 2 seconds. If shorter, it will not play. Please add blank if necessary. Place all the alphabet sounds in a directory named alpha and all syllables sounds in a directory named syllab.

2- Write sounds.xml

Create a text file sounds.xml, preferably using Kate as editor or another editor capable of different encoding. In this file, write all the alphabet sounds and syllable sounds you recorded, like this example for the czech language:

<klettres>
<language code="cs">
 <menuitem> <label>&Czech</label>
 </menuitem>
 <alphabet>
  <sound name="A" file="cs/alpha/a.ogg" />
    ...
 </alphabet>
 <syllables>
  <sound name="BA" file="cs/syllab/ba.ogg" />
    ...
 </syllables>
</language>
</klettres>

Replace "cs" with the two letter code and "Czech" with the name of your language. Write the sound names with the special characters of your language in upper case in utf8.

3- Write .txt file

Create a text file cs.txt (replace "cs" with the two letter code of your language) with each special character in your language in upper case on one line. And save both text files with utf8 encoding (upper right dropbox in kate allows that)

4- Modify sounds.xml file in data directory

  1. Copy from sounds.xml you just created the code between tags.
  2. Paste the code into /usr/share/apps/klettres/data/sounds.xml after tag.
  3. Save modification.

5- Test at your own DoudouLinux

  1. Create a directory in /usr/share/apps/klettres/ and call it with 2-letters name of your language (for example, ’cs’). Place alpha and syllab directories into it
  2. Place sounds.xml at the same directory
  3. Replace /usr/share/apps/klettres/data/sounds.xml with modified file
  4. Place .txt file at /usr/share/apps/klettres/ directory
  5. Run kLettres

6- Send a tar Package to DoudouLinux team and KDE

tar the 2 sounds directories plus the 2 text files and send them to Jean-Michel. You are also welcome to make a CC to annma AT kde DOT org. She will then place the sounds in the corresponding module and also on the KLettres website so they will be available for all KLettres users in the world.

Good luck and thanks a lot!


identica logo facebook logo google+ logo

Geographical location of visitors

DoudouLinux logo Debian logo TSPU logo Genesi logo Gandi logo Hosting Extreme logo Linux Jobs Reviewed by I love Free Software

Creative Commons Copyright © DoudouLinux.org team - All texts from this site are published under the license Creative Commons BY-SA

SPIP | template | Site Map| Follow-up of the site's activity RSS 2.0