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 Details

  • Method Details

    • 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