public String translate(String text, String sourceLanguage, String targetLanguage)
throws TDictionaryNotAvailable, TTextNotTranslatable, RemoteException {
Locale sourceLocale = new Locale(sourceLanguage);
Locale targetLocale = new Locale(targetLanguage);
DictionaryFactory dictionaryFactory = DictionaryFactory.getInstance(sourceLocale, targetLocale);
Dictionary dictionary = dictionaryFactory.createDictionary(sourceLocale, targetLocale);
return dictionary.translate(text);
}