/** * Creates an instance without any value. * * @return instance without any value */ public static LocalizedStrings empty() { return of(); }
/** * Creates a LocalizedStrings for the {@code Locale.ENGLISH}. * @param value the value of the english translation * @return localized string with value */ public static LocalizedStrings en(final String value) { return LocalizedStrings.of(Locale.ENGLISH, value); }
@JsonIgnore public static LocalizedStrings ofEnglishLocale(final String value) { return of(Locale.ENGLISH, value); }
/** * Creates an instance without any value. * * @return instance without any value */ @JsonIgnore public static LocalizedStrings of() { return of(new HashMap<>()); }
public static LocalizedStrings randomSlug() { return LocalizedStrings.of(Locale.ENGLISH, randomKey()); }
public static MetaAttributes metaAttributesOf(final Locale locale, final String metaTitle, final String metaDescription, final String metaKeywords) { return MetaAttributesDsl.of() .withTitle(LocalizedStrings.of(locale, metaTitle)) .withDescription(LocalizedStrings.of(locale, metaDescription)) .withKeywords(LocalizedStrings.of(locale, metaKeywords)); } }