Annotation Type MessageBundle


  • @Retention(RUNTIME)
    @Target(TYPE)
    public @interface MessageBundle
    Denotes a message bundle interface.

    Each method represents a single message:

     
     @MessageBundle
     interface MyBundle {
    
         @Message("Hello {name}!")
         String hello_world(String name);
     }
     
     
    • Field Detail

      • DEFAULT_LOCALE

        static final String DEFAULT_LOCALE
        Constant value for locale() indicating that the default locale specified via the quarkus.default-locale config property should be used.
      • DEFAULT_NAME

        static final String DEFAULT_NAME
        Constant value for value().
    • Element Detail

      • value

        String value
        The name is used as a namespace in templates expressions. By default, the namespace "msg" is used:
         {msg:hello_world}
         
        If multiple bundles declare the same name the build fails.
        Returns:
        the name
        Default:
        "msg"
      • locale

        String locale
        Returns:
        the locale for the default message bundle
        Default:
        "<<default locale>>"