January 27th, 2006

Amhapplet is primarly intended to be used on websites where users give feedback in languages such as amharic.It tries to implement popular input methods such as Sera that maps qwerty keyboards to amharic letters.

To integrate amhapplet to your forms, replace your textArea to somethig like

<applet name=”amhApplet” code=”unicodeClient.UnicodeArea.class” codebase=”/java” archive=”amhApplet.jar” width=”800″ height=”200″/>
</applet>

and put a hidden field inside your form

<input type=”hidden” name=”content” id=”postText”/>

Then add a javascript function wich links the typed text with the hidden field with something like


function postEntry()
{
document.forms['post'].content.value=document.applets["amhApplet"].getText();

document.forms["post"].submit();
}

The last step is to call this function when the user submit the form (by hitting on a button for example)

<input name=”publish” type=”submit” id=”publish” tabindex=”10″ value=”Publish” onClick=”postEntry()”/>

You are done.

Amhapplet can also be used in standalone mode (run “java -jar Amhapplet” or use the installer in windows platforms).

In this mode, you can add other input methods by simply putting a config file in xml format wich indicates how the mappings are done . Example
:

<?xml version=”1.0″ encoding=”UTF-8″>
<inputmethod name=”devanagari” language=”hindi”>
<keys for=”q” to=”ौ”/>
<keys for=”w” to=”ै”/>
<keys for=”e” to=”ा”/>
<keys for=”r” to=”ी”/>
<keys for=”t” to=”ू”/>
<keys for=”y” to=”ब”/>
<keys for=”u” to=”ह″/>
<keys for=”i” to=”ग”/>
<keys for=”o” to=”द”/>
<keys for=”p” to=”ज”/>
<keys for=”[” to=”ड”/>
<keys for=”]” to=”़”/>
<keys for=”\” to=”ॉ”/>

…;

The associated schema inputMethod.xsd must validate the xml in order to insure it is well formed.