Package com.adobe.acs.commons.i18n
Interface I18nProvider
public interface I18nProvider
Provides I18n translations translations / maps from a resource or locale
-
Method Summary
Modifier and TypeMethodDescriptioncom.day.cq.i18n.I18nProvides the i18n map based on the underlying resourcecom.day.cq.i18n.I18ni18n(javax.servlet.http.HttpServletRequest request) Provides the i18n map based on the requestcom.day.cq.i18n.I18ni18n(org.apache.sling.api.resource.Resource resource) Provides the i18n map based on the underlying resourcedefault com.day.cq.i18n.I18ni18n(org.apache.sling.api.resource.Resource resource, boolean localeIgnoreContent) Provides the i18n map based on the underlying resourceProvides the translated value based on resourceProvides the translated value based on requestProvides the translated value based on resourcedefault StringProvides the translated value based on resource
-
Method Details
-
translate
Provides the translated value based on resource- Parameters:
key- i18n keyresource- underlying resource- Returns:
- translated string
-
translate
default String translate(String key, org.apache.sling.api.resource.Resource resource, boolean localeIgnoreContent) Provides the translated value based on resource- Parameters:
key- i18n keyresource- underlying resourcelocaleIgnoreContent- if true only the path is used to determine the language.- Returns:
- translated string
- See Also:
-
Page.getLanguage(boolean)
-
translate
Provides the translated value based on resource- Parameters:
key- i18n keylocale- locale- Returns:
- translated string
-
translate
Provides the translated value based on request- Parameters:
key- i18n keyrequest- 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
default com.day.cq.i18n.I18n i18n(org.apache.sling.api.resource.Resource resource, boolean localeIgnoreContent) Provides the i18n map based on the underlying resource- Parameters:
resource- underlying resourcelocaleIgnoreContent- if true only the path is used to determine the language.- Returns:
- i18n map
- See Also:
-
Page.getLanguage(boolean)
-
i18n
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
-