com.holonplatform.core.i18n

## Interface MessageResolver

- All Superinterfaces:
    Serializable

      public interface MessageResolver
      extends Serializable

  Messages localization resolver, with message arguments support.
  Since:
    5.2.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Optional<String>` | `getMessage(Locale locale, String code, Object... arguments)` Get the localized message which corresponds to given message localization `code`, if available, using the given `locale`.
    `String` | `getMessage(Locale locale, String code, String defaultMessage, Object... arguments)` Get the localized message which corresponds to given message localization `code`, using the given `locale`.

- - ### Method Detail

    - #### getMessage

          Optional<String> getMessage(Locale locale,
                                      String code,
                                      Object... arguments)

      Get the localized message which corresponds to given message localization `code`, if available, using the given `locale`.
      Parameters:
        `locale` - The `Locale` for which to obtain the message localization (not null)
        `code` - The message localization code (not null)
        `arguments` - Optional message localization arguments
      Returns:
        Optional localized message

    - #### getMessage

          String getMessage(Locale locale,
                            String code,
                            String defaultMessage,
                            Object... arguments)

      Get the localized message which corresponds to given message localization `code`, using the given `locale`.
      Parameters:
        `locale` - The `Locale` for which to obtain the message localization (not null)
        `code` - The message localization code (not null)
        `defaultMessage` - The default message to use if the message localization is not available (not null)
        `arguments` - Optional message localization arguments
      Returns:
        The localized message, or the `defaultMessage` if the message localization is not available

Copyright © 2019 The Holon Platform. All rights reserved.