Package ca.uhn.fhir.i18n
Class HapiLocalizer
java.lang.Object
ca.uhn.fhir.i18n.HapiLocalizer
This feature is not yet in its final state and should be considered an internal part of HAPI for now - use with caution
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddMessage(String theKey, String theMessage)Subclasses may use this to add hardcoded messagesgetFormatString(String theQualifiedKey)getMessage(Class<?> theType, String theKey, Object... theParameters)getMessage(String theQualifiedKey, Object... theParameters)getMessageSanitized(Class<?> theType, String theKey, Object... theParameters)Create the message and sanitize parameters usingprotected voidstatic voidsetOurFailOnMissingMessage(boolean ourFailOnMissingMessage)This global setting causes the localizer to fail if any attempts are made to retrieve a key that does not exist.static String
-
Field Details
-
UNKNOWN_I18N_KEY_MESSAGE
- See Also:
- Constant Field Values
-
-
Constructor Details
-
HapiLocalizer
public HapiLocalizer() -
HapiLocalizer
-
-
Method Details
-
addMessage
Subclasses may use this to add hardcoded messages -
getAllKeys
-
getFormatString
- Returns:
- Returns the raw message format string for the given key, or returns
UNKNOWN_I18N_KEY_MESSAGEif not found
-
getMessage
-
getMessageSanitized
Create the message and sanitize parameters using -
getMessage
-
init
-
getLocale
-
setOurFailOnMissingMessage
This global setting causes the localizer to fail if any attempts are made to retrieve a key that does not exist. This method is primarily for unit tests. -
toKey
-