java.lang.Object
impl.org.controlsfx.i18n.Localization
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic final StringConverts text to localization key, currently by prepending it with the KEY_PREFIXstatic final LocaleReturns the Locale object that is associated with ControlsFX.static final StringReturns a string localized using currently set localestatic final booleanChecks if the text is a localization keystatic StringTries to localize the text.static final voidSets locale which will be used as ControlsFX locale
-
Field Details
-
KEY_PREFIX
- See Also:
-
-
Method Details
-
getLocale
Returns the Locale object that is associated with ControlsFX.- Returns:
- the global ControlsFX locale
-
setLocale
Sets locale which will be used as ControlsFX locale- Parameters:
newLocale- null is allowed and will be interpreted as default locale
-
getString
Returns a string localized using currently set locale- Parameters:
key- resource bundle key- Returns:
- localized text or formatted key if not found
-
asKey
Converts text to localization key, currently by prepending it with the KEY_PREFIX- Parameters:
text-- Returns:
- localization key
-
isKey
Checks if the text is a localization key- Parameters:
text-- Returns:
- true if text is a localization key
-
localize
Tries to localize the text. If the text is a localization key - and attempt will be made to use it for localization, otherwise the text is returned as is- Parameters:
text-- Returns:
-