Package org.hl7.fhir.utilities
Class TranslatorXml
java.lang.Object
org.hl7.fhir.utilities.TranslatorXml
- All Implemented Interfaces:
TranslationServices
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlistTranslations(String category) get a list of translation codes by categorytoStr(float value) localization for converting a decimal to language specific representationlocalization for converting a date to language specific representationequivalent to the general translation operation, but the context that provides the transations specifies the target languageGeneral translation functionality - given a string, translate it to a different languagetranslateAndFormat(String context, String lang, String value, Object... args) General translation functionality - given a string, translate it to a different language, but also perform String.format on the outcome.translations(String value) Get a list of all translations available for a phrase
-
Constructor Details
-
TranslatorXml
public TranslatorXml(String filename) throws ParserConfigurationException, SAXException, IOException
-
-
Method Details
-
translate
Description copied from interface:TranslationServicesGeneral translation functionality - given a string, translate it to a different language- Specified by:
translatein interfaceTranslationServices- Parameters:
context- - for debugging purposesvalue- - the string to translatetargetLang- - the target language to translate to.- Returns:
- the translated string, or value if no translation is found
-
translateAndFormat
Description copied from interface:TranslationServicesGeneral translation functionality - given a string, translate it to a different language, but also perform String.format on the outcome.- Specified by:
translateAndFormatin interfaceTranslationServices- Returns:
-
translate
Description copied from interface:TranslationServicesequivalent to the general translation operation, but the context that provides the transations specifies the target language- Specified by:
translatein interfaceTranslationServices- Returns:
-
toStr
Description copied from interface:TranslationServiceslocalization for converting a decimal to language specific representation- Specified by:
toStrin interfaceTranslationServices- Returns:
-
toStr
Description copied from interface:TranslationServiceslocalization for converting a date to language specific representation- Specified by:
toStrin interfaceTranslationServices- Returns:
-
translations
Description copied from interface:TranslationServicesGet a list of all translations available for a phrase- Specified by:
translationsin interfaceTranslationServices- Returns:
-
listTranslations
Description copied from interface:TranslationServicesget a list of translation codes by category- Specified by:
listTranslationsin interfaceTranslationServices- Returns:
-