Package com.priint.pubserver.lang
Class TranslationsUnit
- java.lang.Object
-
- com.priint.pubserver.lang.TranslationsUnit
-
- All Implemented Interfaces:
MergableConfig<TranslationsUnit>,java.io.Serializable
public class TranslationsUnit extends java.lang.Object implements MergableConfig<TranslationsUnit>, java.io.Serializable
List of translations- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<Translation>translations
-
Constructor Summary
Constructors Constructor Description TranslationsUnit()TranslationsUnit(java.util.List<Translation> translations)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TranslationgetTranslation(java.lang.String identifier)TranslationgetTranslation(java.lang.String identifier, java.lang.String languageCode)java.util.List<Translation>getTranslations()TranslationsUnitlocalized(@NotNull java.lang.String languageCode)TranslationsUnitmergeWithCustom(@NotNull TranslationsUnit customConfig)Merge translations between custom_translations.xml and translations.xml
Strategy: for duplicated entries take one from custom_translations.xmlvoidsetTranslations(java.util.List<Translation> translations)java.lang.StringtoString()
-
-
-
Field Detail
-
translations
protected java.util.List<Translation> translations
-
-
Constructor Detail
-
TranslationsUnit
public TranslationsUnit()
-
TranslationsUnit
public TranslationsUnit(java.util.List<Translation> translations)
-
-
Method Detail
-
getTranslations
public java.util.List<Translation> getTranslations()
-
setTranslations
public void setTranslations(java.util.List<Translation> translations)
-
mergeWithCustom
public TranslationsUnit mergeWithCustom(@NotNull @NotNull TranslationsUnit customConfig)
Merge translations between custom_translations.xml and translations.xml
Strategy: for duplicated entries take one from custom_translations.xml- Specified by:
mergeWithCustomin interfaceMergableConfig<TranslationsUnit>- Parameters:
customConfig- custom_translations.xml- Returns:
- merged list of translations
-
localized
public TranslationsUnit localized(@NotNull @NotNull java.lang.String languageCode)
-
getTranslation
public Translation getTranslation(java.lang.String identifier)
-
getTranslation
public Translation getTranslation(java.lang.String identifier, java.lang.String languageCode)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-