Interface LocalesBuildTimeConfig


@ConfigMapping(prefix="quarkus") @ConfigRoot(phase=BUILD_AND_RUN_TIME_FIXED) @ConfigDocPrefix("quarkus.locales") public interface LocalesBuildTimeConfig
Localization.
  • Field Details

  • Method Details

    • locales

      @WithDefault("${user.language:en}-${user.country:}") @ConfigDocDefault("Set containing the build system locale") 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

      @ConfigDocDefault("Defaults to the JVM\'s default locale if not set. Starting with GraalVM for JDK 24, it defaults to en-US for native executables.") 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.