Transcription with Java -
does know if there possibility how can example transcribe russian input latin?
there framework supports that? searching charset doesn't support case
thx in advance.
map<character, string> translit = new hashmap<>(); static { translit.put('а', "a"); translit.put('б', "b"); translit.put('в', "v"); // ... translit.put('ж', "zh"); // , on } public string transliterate(string input) { char[] c = input.tochararray(); stringbuilder output = new stringbuilder(); (char ch : c) { output.append(translit.contains(ch) ? translit.get(ch) : string.valueof(ch)); } return output.tostring(); }
Comments
Post a Comment