Singleton enum for internationalization (i18n) support.
More...
|
| static ResourceBundle | bundle |
| |
| static final ResourceBundle | ENGLISH_BUNDLE |
| |
| static final ResourceBundle | FRENCH_BUNDLE |
| |
| static final String | I_18_N_PATH = AppPaths.I18N_PATH.getPath() |
| |
| static final ObjectProperty< Locale > | LOCALE |
| |
| static final Locale | LOCALE_EN = Locale.of("en", "US") |
| |
| static final Locale | LOCALE_FR = Locale.of("fr", "FR") |
| |
| static final Logger | LOG = LoggerFactory.getLogger(I18n.class) |
| |
Singleton enum for internationalization (i18n) support.
Manages language resources and locale synchronization.
◆ [static initializer]()
| fr.softsf.sudokufx.common.enums.I18n.[static initializer] |
|
static |
◆ getHostEnvironmentLanguageCode()
| String fr.softsf.sudokufx.common.enums.I18n.getHostEnvironmentLanguageCode |
( |
| ) |
|
- Returns
- Host system language code.
◆ getLanguage()
| String fr.softsf.sudokufx.common.enums.I18n.getLanguage |
( |
| ) |
|
- Returns
- Current language code ("en", "fr", etc.).
◆ getValue()
| String fr.softsf.sudokufx.common.enums.I18n.getValue |
( |
final String | key | ) |
|
Returns the localized string for the given key.
- Parameters
-
- Returns
- Translated value or fallback.
◆ localeProperty()
| ObjectProperty< Locale > fr.softsf.sudokufx.common.enums.I18n.localeProperty |
( |
| ) |
|
- Returns
- Observable locale property.
◆ setLanguageBasedOnTheHostEnvironment()
| void fr.softsf.sudokufx.common.enums.I18n.setLanguageBasedOnTheHostEnvironment |
( |
| ) |
|
Sets the language to match host system (defaulting to English if not French).
◆ setLocaleBundle()
| synchronized I18n fr.softsf.sudokufx.common.enums.I18n.setLocaleBundle |
( |
final String | i18n | ) |
|
Updates the current locale and bundle based on language code.
"EN" sets English; any other value defaults to French.
- Parameters
-
- Returns
- Singleton instance.
◆ bundle
| ResourceBundle fr.softsf.sudokufx.common.enums.I18n.bundle |
|
staticprivate |
◆ ENGLISH_BUNDLE
| final ResourceBundle fr.softsf.sudokufx.common.enums.I18n.ENGLISH_BUNDLE |
|
staticprivate |
◆ FRENCH_BUNDLE
| final ResourceBundle fr.softsf.sudokufx.common.enums.I18n.FRENCH_BUNDLE |
|
staticprivate |
◆ I_18_N_PATH
| final String fr.softsf.sudokufx.common.enums.I18n.I_18_N_PATH = AppPaths.I18N_PATH.getPath() |
|
staticprivate |
◆ INSTANCE
| fr.softsf.sudokufx.common.enums.I18n.INSTANCE |
◆ LOCALE
| final ObjectProperty<Locale> fr.softsf.sudokufx.common.enums.I18n.LOCALE |
|
staticprivate |
Initial value:=
new SimpleObjectProperty<>(Locale.getDefault())
◆ LOCALE_EN
| final Locale fr.softsf.sudokufx.common.enums.I18n.LOCALE_EN = Locale.of("en", "US") |
|
staticprivate |
◆ LOCALE_FR
| final Locale fr.softsf.sudokufx.common.enums.I18n.LOCALE_FR = Locale.of("fr", "FR") |
|
staticprivate |
◆ LOG
| final Logger fr.softsf.sudokufx.common.enums.I18n.LOG = LoggerFactory.getLogger(I18n.class) |
|
staticprivate |
The documentation for this enum was generated from the following file:
- src/main/java/fr/softsf/sudokufx/common/enums/I18n.java