Interface I18NDictionary


public interface I18NDictionary
Simplified interface for interacting with Sling's i18n dictionary.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    get(String key)
    Gets the value for the specified key.
    get(String key, Object[] args)
    Get the value for the specified key replacing the tokens in order.
  • Method Details

    • get

      String get(String key)
      Gets the value for the specified key.
      Parameters:
      key - the key to use
      Returns:
      the value for the key
    • get

      String get(String key, Object[] args)
      Get the value for the specified key replacing the tokens in order. To provide tokens, in your i18n value, provide them in the format:
       Here's my key, this {0} will be replaced and so will this {1}
       
      Parameters:
      key - the key to use
      args - the arguments to replace
      Returns:
      the value for the key