Quantcast
Channel: MobileRead Forums - Kindle Developer's Corner
Viewing all articles
Browse latest Browse all 4414

PW3 Keyboard localization to Korean

$
0
0
Hi all,
I'm trying to localize default keyboard to Korean on jailbroken PW3 with 5.8.1 FW.
Since the most languages are supported now, or easily be done with pre-existing localization files inside /usr/share/keyboard (including Korean keymap), regarding old threads are seemed to be abandoned.
If it's not, I'm sorry and please let me know the thread that I can ask for a help.

First of all, I succeeded to change the keyboard layout and print Korean letters. I copied 'ko' folder from /usr/share/keyboard, which contains Korean keymap files, into /var/local/keyboard and modified file names, and then mounted to some other supported keyboard. For example, change the filename from ko-1448x1072.keymap.gz to ru-1448x1072.keymap.gz and then by using 'mount --bind' to bind /var/local/keyboard/ko into /usr/share/keyboard/ru.

Most of languages are covered enough with so far. But the problem is Korean character(called Hangul) is distinguished from other characters because each letter should be assembled or composed with other letters to make one complete character. For example, 한(U+D55C) is composed of 3 letters: ㅎ(U+1112), ㅏ(U+1161), ㄴ(U+11AB). The display sequence on the screen is ㅎ -> 하(another composed character) -> 한. But now they're just displayed as three separate characters on the screen(ㅎㅏㄴ). In conclusion, it needs some kind of post-processing after a key is typed.

At first, I thought binary files inside keyboard folder(*.kdb, *.ldb, utils.so) are something to do with it. But after a few experiments, I concluded that it's only related to input suggestion.

And then I found that Japanese keyboard has a similar post-processing system. Basically, it's a system that converts Romaji to Hiragana according to hiragana_rules.txt which I found inside 'ja' folder. If you type 'a' or 'ha' it converts them into appropriate Japanese character. In the text file 'hiragana_rules.txt', there is a bunch of such rules. So I thought it would be possible to post-processing Korean letters by tweaking these rules. But again, this text file seems irrelevant to current keyboard behavior. It says "These rules replace the default ICU behavior" but it was not. I guess these rules have been compiled and exist somewhere else inside the device in a binary form.

Finally, I decided to hook the keyboard and add some post processing on it. But I have no idea where to start. And also, I'm not fully aware of the software stack of PW3 because I started this since yesterday. I've searched around this forum but haven't found the useful information yet. So it would be a great help if someone could give me some hints or suggest an easier way.

:thanks:

Attached Thumbnails
Click image for larger version

Name:	screenshot_2016_08_10T15_22_58+0900.png
Views:	N/A
Size:	28.2 KB
ID:	150823  

Viewing all articles
Browse latest Browse all 4414

Trending Articles