SudokuFX
|
Utility class for internationalization (i18n) support. More...
Static Public Member Functions | |
static String | getLanguage () |
Gets the current language of the application. | |
static String | getValue (final String key) |
Retrieves the localized string value for a given key. | |
static void | setLocaleBundle (final String i18n) |
Sets the current language for the application. | |
Private Member Functions | |
I18n () | |
Private constructor to prevent instantiation of this utility class. | |
Static Private Attributes | |
static ResourceBundle | bundle = FRENCH_BUNDLE |
static final ResourceBundle | ENGLISH_BUNDLE = ResourceBundle.getBundle(I_18_N_PATH, LOCALE_EN) |
static final ResourceBundle | FRENCH_BUNDLE = ResourceBundle.getBundle(I_18_N_PATH, LOCALE_FR) |
static final String | I_18_N_PATH = MyEnums.Paths.I18N_PATH.getPath() |
static final Locale | LOCALE_EN = Locale.of("en", "US") |
static final Locale | LOCALE_FR = Locale.of("fr", "FR") |
Utility class for internationalization (i18n) support.
This class manages language resources and provides methods to switch between languages and retrieve localized strings.
|
private |
Private constructor to prevent instantiation of this utility class.
|
static |
Gets the current language of the application.
|
static |
Retrieves the localized string value for a given key.
key | The String key representing the desired localized string |
java.util.MissingResourceException | if the key is not found in the resource bundle |
|
static |
Sets the current language for the application.
i18n | The String representation of the language ("EN" for English, or any other value for French) |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |