Package org.ametys.odf.translation
Class TranslationHelper
- java.lang.Object
-
- org.ametys.odf.translation.TranslationHelper
-
public final class TranslationHelper extends Object
Translation helper: get and set translations for a content.
-
-
Field Summary
Fields Modifier and Type Field Description static String
TRANSLATIONS_METADATA
The translations metadata name.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Map<String,String>
getTranslations(Content content)
Get the translations of a content.static void
setTranslations(ModifiableContent content, Map<String,String> translations)
Set the translations on a content.
-
-
-
Field Detail
-
TRANSLATIONS_METADATA
public static final String TRANSLATIONS_METADATA
The translations metadata name.- See Also:
- Constant Field Values
-
-
Method Detail
-
getTranslations
public static Map<String,String> getTranslations(Content content)
Get the translations of a content.- Parameters:
content
- the Content.- Returns:
- the translations as a Map of language -> content ID. FIXME CMS-9941: Use the DataHolder Internal API
-
setTranslations
public static void setTranslations(ModifiableContent content, Map<String,String> translations)
Set the translations on a content.- Parameters:
content
- the Content.translations
- the translations to set, as a Map of language -> content ID. FIXME CMS-9941: Use the DataHolder Internal API
-
-