[gcompris-devel] i18n falling letters

Yan Seiner yan at cardinalengineering.com
Tue Feb 10 14:12:08 UTC 2004


OK, I've got some progress, but I want to make sure I'm on the right 
track as far as inclusion in the mainstream.  Much of the UTF-8 code is 
taken from fallingwords.

I propose to have letters files for each language, much in the same way 
that fallingwords has vocabulary files in each language.  The files 
would have the following format:

level1 nnnnnnnnnnnnnnn
level2 mmmmmmmmmmmmmmm
level3 oooooooooooooooo
level4 pppppppppppppppppp
level5 qqqqqqqqqqqqqqqqqqqq
level6 rrrrrrrrrrrrrrrr
あ 3
え 5
ア 3

where each level would have all the letters the user wants to see in 
play at that level.

A keymap begins after level 6; this allows the user to map keys on the 
keyboard to specific unicode chars.  The reason I'm doing this is that 
it's just too cumbersome to use the kana input method in Japanese; 
there's just too many keystrokes and the game becomes one of keyboard 
manipulation rather than letter recognition.

So, a user can map the keyboard key '3' to the character 'あ' for 
example.  Thus when 'あ' appears in the falling letters, the child has 
to push the key '3' (which, on a Japanese keyboard, is marked as both 3 
and あ) and so on.  Multiple mappings are allowed, so keys can be used 
for '3', 'あ', and 'ア', all of which are generated by the same key on a 
Japanese keyboard.

The program will check the keymap first, and if it fails to find a 
mapping, will then do a unicode conversion and compare the unicode 
keystroke with the unicode falling char.  This will hopefully allow full 
integration with various input methods later.

Comments, etc. welcome.  I'm hoping to have alpha code sometime next week.

--Yan

-- 
         o
      /\ /_       o__
    o*  ~(_)      ,>/'_      o__
Yan Seiner, PE  (_)\(_)     ,>/'_   o__     o__
Cardinal Engineering, Inc. (_)\(_)  ,>/'_   ,>/'_
http://www.cardinalengineering.com (_)\(_) (_)\(_)
spam killer code kpwq1jkcsEzdx39gnkVvgycd15ayqq






More information about the Gcompris-devel mailing list