Package com.jsql.view.swing.util
Class I18nViewUtil
java.lang.Object
com.jsql.view.swing.util.I18nViewUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addComponentForKey
(String key, Object component) Add a graphical component to those whose text must be changed when the language changes.componentsByKey
(String key) Get a list of graphical components whose text corresponds to the i18n key in the properties.keys()
Return the i18n keys of components whose text is replaced when the translation changes.static String
valueByKey
(String key) Return the text corresponding to a i18n key in the properties.static String
valueByKey
(String key, Locale newLocale)
-
Method Details
-
keys
Return the i18n keys of components whose text is replaced when the translation changes.- Returns:
- a set of key names of a i18n key in the properties
-
componentsByKey
Get a list of graphical components whose text corresponds to the i18n key in the properties.- Parameters:
key
- name of a i18n key in the properties- Returns:
- a list of graphical components
-
addComponentForKey
Add a graphical component to those whose text must be changed when the language changes.- Parameters:
key
- name of a i18n key in the propertiescomponent
- graphical component which will receive the translated text
-
valueByKey
Return the text corresponding to a i18n key in the properties.- Parameters:
key
- a i18n key in the properties- Returns:
- text corresponding to the key
-
valueByKey
-