Package org.hl7.fhir.utilities
Interface TranslationServices
-
- All Known Implementing Classes:
TranslatorXml
public interface TranslationServices
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<String>listTranslations(String category)get a list of translation codes by categoryStringtoStr(float value)localization for converting a decimal to language specific representationStringtoStr(Date value)localization for converting a date to language specific representationStringtranslate(String context, String value)equivalent to the general translation operation, but the context that provides the transations specifies the target languageStringtranslate(String context, String value, String targetLang)General translation functionality - given a string, translate it to a different languageStringtranslateAndFormat(String contest, String lang, String string2, Object... args)General translation functionality - given a string, translate it to a different language, but also perform String.format on the outcome.Map<String,String>translations(String value)Get a list of all translations available for a phrase
-
-
-
Method Detail
-
translate
String translate(String context, String value, String targetLang)
General translation functionality - given a string, translate it to a different language- 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
String translateAndFormat(String contest, String lang, String string2, Object... args)
General translation functionality - given a string, translate it to a different language, but also perform String.format on the outcome.- Parameters:
contest-lang-string2-args-- Returns:
-
translate
String translate(String context, String value)
equivalent to the general translation operation, but the context that provides the transations specifies the target language- Parameters:
context-value-- Returns:
-
translations
Map<String,String> translations(String value)
Get a list of all translations available for a phrase- Parameters:
value-- Returns:
-
toStr
String toStr(float value)
localization for converting a decimal to language specific representation- Parameters:
value-- Returns:
-
toStr
String toStr(Date value)
localization for converting a date to language specific representation- Parameters:
value-- Returns:
-
listTranslations
Set<String> listTranslations(String category)
get a list of translation codes by category- Parameters:
category-- Returns:
-
-