Class LanguageService

java.lang.Object
de.digitalcollections.cudami.admin.business.i18n.LanguageService

@Service public class LanguageService extends Object
  • Constructor Details

    • LanguageService

      public LanguageService(CudamiClient client, @Value("${cudami.prioritisedSortedLanguages}") List<Locale> prioritisedSortedLanguages, org.springframework.context.MessageSource messageSource)
  • Method Details

    • getAllLanguages

      public List<Locale> getAllLanguages() throws de.digitalcollections.model.exception.TechnicalException
      Throws:
      de.digitalcollections.model.exception.TechnicalException
    • getAllLanguagesAsLocales

      public List<Locale> getAllLanguagesAsLocales() throws de.digitalcollections.model.exception.TechnicalException
      Throws:
      de.digitalcollections.model.exception.TechnicalException
    • getAllLanguagesAsString

      public List<String> getAllLanguagesAsString() throws de.digitalcollections.model.exception.TechnicalException
      Throws:
      de.digitalcollections.model.exception.TechnicalException
    • getAllLocales

      public List<Locale> getAllLocales() throws de.digitalcollections.model.exception.TechnicalException
      Throws:
      de.digitalcollections.model.exception.TechnicalException
    • getDefaultLanguage

      public Locale getDefaultLanguage() throws de.digitalcollections.model.exception.TechnicalException
      Throws:
      de.digitalcollections.model.exception.TechnicalException
    • getDefaultLocale

      public String getDefaultLocale() throws de.digitalcollections.model.exception.TechnicalException
      Throws:
      de.digitalcollections.model.exception.TechnicalException
    • getExistingLanguages

      public List<Locale> getExistingLanguages(Locale defaultLanguage, de.digitalcollections.model.text.LocalizedText localizedText)
    • getExistingLanguages

      public List<Locale> getExistingLanguages(de.digitalcollections.model.text.LocalizedText localizedText)
    • getExistingLanguagesForLocales

      public List<Locale> getExistingLanguagesForLocales(List<Locale> locales)
    • getLocalizedLanguageString

      public String getLocalizedLanguageString(Locale locale, Locale displayLocale)
    • sortLanguages

      public List<Locale> sortLanguages(Locale displayLocale, Collection<Locale> languagesToSort)