java - How to convert Whole Chinese String to English letters? -
currently converting german umlauts using below code:
string nfdnormalizedstring = normalizer.normalize(displayname, normalizer.form.nfd); pattern pattern = pattern.compile("\\p{incombiningdiacriticalmarks}+"); pattern.matcher(nfdnormalizedstring).replaceall("");
i need same chinese characters; need remove because of comparison of strings.
any appreciated.
the best way using "google translate api"
using super easy,
here,
key = text translated
source = source language
target = target language
once make request it'll return json string containing result,
{ "data": { "translations": [ { "translatedtext": "hallo welt" } ] } }
here goes reference link,
Comments
Post a Comment