Class LocalesBuildTimeConfig

java.lang.Object
io.quarkus.runtime.LocalesBuildTimeConfig

@ConfigRoot(name="<<parent>>", phase=BUILD_AND_RUN_TIME_FIXED) @ConfigDocPrefix("quarkus.locales") public class LocalesBuildTimeConfig extends Object
Localization.
  • Field Details

    • DEFAULT_LANGUAGE

      public static final String DEFAULT_LANGUAGE
      See Also:
    • DEFAULT_COUNTRY

      public static final String DEFAULT_COUNTRY
      See Also:
    • locales

      @ConfigItem(defaultValue="${user.language:en}-${user.country:}", defaultValueDocumentation="Set containing the build system locale") public Set<Locale> locales
      The set of supported locales that can be consumed by the extensions.

      The locales must be specified in the IETF BCP 47 format e.g. en-US or fr-FR.

      For instance, the Hibernate Validator extension makes use of it.

      Native-image build uses it to define additional locales that are supposed to be available at runtime.

      A special string "all" is translated as ROOT Locale and then used in native-image to include all locales. Image size penalty applies.

    • defaultLocale

      @ConfigItem(defaultValueDocumentation="Defaults to the JVM\'s default locale if not set. Starting with GraalVM for JDK 24, it defaults to en-US for native executables.") public Optional<Locale> defaultLocale
      Default locale that can be consumed by the extensions.

      The locale must be specified in the IETF BCP 47 format e.g. en-US or fr-FR.

      For instance, the Hibernate Validator extension makes use of it.

      Native-image build uses this property to derive user.language and user.country for the application's runtime. Starting with GraalVM for JDK 24 user.language and user.country can also be overridden at runtime, provided the selected locale was included at image build time.

  • Constructor Details

    • LocalesBuildTimeConfig

      public LocalesBuildTimeConfig()