Package eu.xenit.alfred.api.translation
Interface ITranslationService
public interface ITranslationService
Service that provides translations
-
Method Summary
Modifier and TypeMethodDescriptiongetMessageTranslation(String message) Gets the translated message for the current locale for the provided message ID.getMessageTranslation(String message, Locale locale) Gets the translated message for the provided locale for the provided message ID.getTranslations(Locale locale) Gets the translations of the given language (locale).longgetTranslationsCheckSum(Locale locale) Gets the checksum of the current translations of the given language.
-
Method Details
-
getTranslationsCheckSum
Gets the checksum of the current translations of the given language. Can be used for fast checking whether the translations changed or not.- Parameters:
locale- the language of which the checksum of the translations is requested.- Returns:
- The checksum of the current translations of the given language.
-
getTranslations
Gets the translations of the given language (locale).- Parameters:
locale- The language of which the translations are requested.- Returns:
- The translations of the given language.
-
getMessageTranslation
Gets the translated message for the current locale for the provided message ID.- Parameters:
message- The ID of the message to translate.- Returns:
- The translated String message of the current set language.
-
getMessageTranslation
Gets the translated message for the provided locale for the provided message ID.- Parameters:
message- The ID of the message to translate.locale- The ID of the target locale to translate to- Returns:
- The translated String message of the provided locale.
-