Interface TranslationConfig
This TranslationConfig interface is used to return the full list of Language Codes and Content Categories which are
stored within the system. These lists are used by the Translation API as the only acceptable inputs to their
respective parameters.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionReturns a Map of the currently allowed content categories The default location for the categories is: "/libs/granite/translation/resources/categories".Deprecated.getLanguages
(ResourceResolver resolver) Returns a Map of the currently allowed language codes.
-
Field Details
-
PROPERTY_LANGUAGE_LABEL
Name of the property on language nodes that contains the label.- See Also:
-
PROPERTY_CATEGORY_LABEL
Name of the property on category nodes that contains the label.- See Also:
-
-
Method Details
-
getLanguages
Deprecated.since 2.3.0, usegetLanguages(ResourceResolver)
instead. Returns a Map of the currently allowed language codes. The default location for the language codes is: "/libs/wcm/core/resources/languages"- Returns:
Map<String, String>
containing the list of allowed language codes and their respective labels (in English)(<Language Code, Language Label>)
- Throws:
TranslationException
- the translation exception
-
getLanguages
Returns a Map of the currently allowed language codes. The default location for the language codes is: "/libs/wcm/core/resources/languages"- Parameters:
resolver
- used for resolving language code path- Returns:
Map<String, String>
containing the list of allowed language codes and their respective labels (in English)(<Language Code, Language Label>)
-
getCategories
Returns a Map of the currently allowed content categories The default location for the categories is: "/libs/granite/translation/resources/categories".- Returns:
Map<String, String>
containing the list of allowed content categories and their respective labels (in English)(<Content Category, Category Label>)
- Throws:
TranslationException
- the translation exception
-
getLanguages(ResourceResolver)
instead.