View Single Post
Posts: 329 | Thanked: 505 times | Joined on Jul 2008 @ Israel
#86
I would like to use mcip but it does not have Hebrew layout - so I started looking at the code in hope I can maybe fork it. Then after looking at this thread, I've noticed that there are some people that are missing certain characters because of their native language which is neither En or Ch.

Since I recently started adding multilingual support to a project I'm working on (qwazer), I can give several tips that if implemented can solve some issues described above:
1) cute-input-method / src / host / extra / Keyboard.qml:
Extern the Column into a new QML file named layout_ch.qml and another that is named layout_en.qml
And add 2 properties called "name" & "layoutID" in each which will designate the language name (like English) and its ID (like en)
2) Add in a settings dialog the ability to multiselect which layout_<langID>.qml to use according to the selected names
3) Instead of the Column in the Keyboard.qml do the trick described here
4) Similarly with the T9 logic if needed (I couldn't find the T9 database...)
5) Change the switch layout to rotate between the various selected layouts
6) Use qsTr(), but I don't think that you will need it.

I think that that's about it, but I might have missed something.

Edit:
Instead of forking it, for now I changed the util.js to show Hebrew chars instead of English ones when the Ch layout is selected. That is not enough as when I click on a char it has no effect. I will dig more deeply.
Regarding adding several layouts, maybe should also make the util.js => util_en.js && util_ch.js...

Edit 2:
After commenting 5 lines of Ch related code in the releaseKey function, it works like a charm with Hebrew as well (no T9 yet).
I will attached the two modified files later today to this thread.
BTW, something that is highly annoying - the Fn key no longer works in Terminal - is it a known issue?

Edit 3:
One more issue: when clicking space the layout changes briefly to English so when typing fast enough, there are some English characters at the beginning of some words...

Last edited by damagedspline; 2011-06-29 at 11:04. Reason: Switched Ch with עב