Usage example 1:
TranslitDocument document = TranslitDocumentFactory.newInstance().newTranslitDocument(); document.insertAt(0, "SCH'i da kasha - pisch'a nasha.", TranslitDictionary.Side.RIGHT); System.out.println(document.getString(TranslitDictionary.Side.LEFT));
Usage example 2:
TranslitDocument document = TranslitDocumentFactory.newInstance().newTranslitDocument(new XmlTranslitDictionary("/dictionary_def.xml")); document.insertAt(0, "SCH'i da kasha - pisch'a nasha.", TranslitDictionary.Side.RIGHT); System.out.println(document.getString(TranslitDictionary.Side.LEFT));
Usage example 3:
TranslitDocument document = new DefaultTranslitDocument(new XmlTranslitDictionary("/dictionary_def.xml")); document.insertAt(0, "SCH'i da kasha - pisch'a nasha.", TranslitDictionary.Side.RIGHT); System.out.println(document.getString(TranslitDictionary.Side.LEFT));
Output:
Щи да каша - пища наша.