Class I18nConfig

  • All Implemented Interfaces:

    
    public final class I18nConfig
    
                        

    Settings-group for ServerPackCreators language: parses the stored language-property into a locale, propagates every change to the given i18n4k-configuration, and persists locale-changes via the injected saveToDisk-callback. Extracted from ApiProperties (refactor Phase 1b); ApiProperties remains the facade through which consumers access these values.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      I18nConfig(PropertyStore store, I18n4kConfigDefault i18n4kConfig, Function0<Unit> saveToDisk)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Locale getLanguage() Language used by ServerPackCreator; reading parses the stored tag (language, language_REGION or language_REGION_variant) and propagates it to the i18n4k-configuration.
      final Unit setLanguage(Locale value) Language used by ServerPackCreator; reading parses the stored tag (language, language_REGION or language_REGION_variant) and propagates it to the i18n4k-configuration.
      final Unit changeLocale(Locale locale) Changes the locale and persists it via the injected save-callback, ensuring every subsequent start of ServerPackCreator uses said locale.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • I18nConfig

        I18nConfig(PropertyStore store, I18n4kConfigDefault i18n4kConfig, Function0<Unit> saveToDisk)
    • Method Detail

      • getLanguage

         final Locale getLanguage()

        Language used by ServerPackCreator; reading parses the stored tag (language, language_REGION or language_REGION_variant) and propagates it to the i18n4k-configuration.

      • setLanguage

         final Unit setLanguage(Locale value)

        Language used by ServerPackCreator; reading parses the stored tag (language, language_REGION or language_REGION_variant) and propagates it to the i18n4k-configuration.

      • changeLocale

         final Unit changeLocale(Locale locale)

        Changes the locale and persists it via the injected save-callback, ensuring every subsequent start of ServerPackCreator uses said locale.