WANAKANA.js Mobile-friendly and lightweight
Japanese Hiragana & Katakana IME

DownloadVersion
View project on GitHub
var input = document.getElementById('ime');
wanakana.bind(input);

Additional functions

nihongonotesuto
wanakana.toRomaji(str);
トフグのすし
wanakana.toKana(str);
あめりか
wanakana.toHiragana(str);
ワニカニ
wanakana.toKatakana(str);

Quick Docs

Function Usage
wanakana.bind(element[,options]) Automatically bind IME functionality to a form textarea or input.
wanakana.unbind(element) Unbind IME from element.
wanakana.isKana(string) Returns false if string contains characters outside of the kana family, otherwise true if Hiragana and/or Katakana.
wanakana.isHiragana(string) Returns false if string contains mixed characters, otherwise true if Hiragana.
wanakana.isKatakana(string) Returns false if string contains mixed characters, otherwise true if Katakana.
wanakana.toKana(string[,options]) Convert Romaji to Kana. Lowcase entries output Hiragana, while upcase entries output Katakana.
wanakana.toHiragana(string[,options]) Convert Katakana or Romaji to Hiragana.
wanakana.toKatakana(string[,options]) Convert Hiragana or Romaji to Katakana.
wanakana.toRomaji(string[,options]) Convert Kana to Romaji.
options = {
IMEMode: false, useObsoleteKana: false passRomaji: false, upcaseKatakana: false, }

Optional 'options' with their defaults.

IMEMode: Set true, 'toHiragana', or 'toKatakana' to convert input from a text input as it is typed.
useObsoleteKana: Set true to use obsolete characters, such as and . passRomaji: Pass through romaji when using toKatakana() or toHiragana()
upcaseKatakana: Convert katakana to uppercase when using toRomaji()

Full Documentation

View the extended API including extra conversion and checking methods.

Library Ports

Language Library Name
Java WanaKanaJava