Interface I18nProvider


  • public interface I18nProvider
    Provides I18n translations translations / maps from a resource or locale
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      com.day.cq.i18n.I18n i18n​(Locale locale)
      Provides the i18n map based on the underlying resource
      com.day.cq.i18n.I18n i18n​(javax.servlet.http.HttpServletRequest request)
      Provides the i18n map based on the request
      com.day.cq.i18n.I18n i18n​(org.apache.sling.api.resource.Resource resource)
      Provides the i18n map based on the underlying resource
      String translate​(String key, Locale locale)
      Provides the translated value based on resource
      String translate​(String key, javax.servlet.http.HttpServletRequest request)
      Provides the translated value based on request
      String translate​(String key, org.apache.sling.api.resource.Resource resource)
      Provides the translated value based on resource
    • Method Detail

      • translate

        String translate​(String key,
                         org.apache.sling.api.resource.Resource resource)
        Provides the translated value based on resource
        Parameters:
        key - i18n key
        resource - underlying resource
        Returns:
        translated string
      • translate

        String translate​(String key,
                         Locale locale)
        Provides the translated value based on resource
        Parameters:
        key - i18n key
        locale - locale
        Returns:
        translated string
      • translate

        String translate​(String key,
                         javax.servlet.http.HttpServletRequest request)
        Provides the translated value based on request
        Parameters:
        key - i18n key
        request - locale
        Returns:
        translated string
      • i18n

        com.day.cq.i18n.I18n i18n​(org.apache.sling.api.resource.Resource resource)
        Provides the i18n map based on the underlying resource
        Parameters:
        resource - underlying resource
        Returns:
        i18n map
      • i18n

        com.day.cq.i18n.I18n i18n​(Locale locale)
        Provides the i18n map based on the underlying resource
        Parameters:
        locale - locale
        Returns:
        i18n map
      • i18n

        com.day.cq.i18n.I18n i18n​(javax.servlet.http.HttpServletRequest request)
        Provides the i18n map based on the request
        Parameters:
        request - request
        Returns:
        i18n map