Class LanguageService
java.lang.Object
de.digitalcollections.cudami.admin.business.i18n.LanguageService
-
Constructor Summary
ConstructorDescriptionLanguageService
(CudamiClient client, List<Locale> prioritisedSortedLanguages, org.springframework.context.MessageSource messageSource) -
Method Summary
Modifier and TypeMethodDescriptiongetExistingLanguages
(de.digitalcollections.model.text.LocalizedText localizedText) getExistingLanguages
(Locale defaultLanguage, de.digitalcollections.model.text.LocalizedText localizedText) getExistingLanguagesForLocales
(List<Locale> locales) getLocalizedLanguageString
(Locale locale, Locale displayLocale) sortLanguages
(Locale displayLocale, Collection<Locale> languagesToSort)
-
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
- Throws:
de.digitalcollections.model.exception.TechnicalException
-
getDefaultLanguage
- Throws:
de.digitalcollections.model.exception.TechnicalException
-
getDefaultLocale
- Throws:
de.digitalcollections.model.exception.TechnicalException
-
getExistingLanguages
-
getExistingLanguages
-
getExistingLanguagesForLocales
-
getLocalizedLanguageString
-
sortLanguages
-