Package com.lokalized
Interface Strings
- All Known Implementing Classes:
DefaultStrings
public interface Strings
Contract for localized string providers - given a key and placeholders, return a localized string.
Format is "You are missing {{requiredFieldCount}} required fields."
- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptionGets a localized string for the given key.Gets a localized string for the given key.Gets a localized string for the given key.Gets a localized string for the given key.
-
Method Details
-
get
Gets a localized string for the given key.If no localized string is available, the key is returned.
- Parameters:
key
- the localization key, not null- Returns:
- a localized string for the key, not null
-
get
Gets a localized string for the given key.If no localized string is available, the key is returned.
- Parameters:
key
- the localization key, not nulllocale
- the preferred locale for the string, may be null- Returns:
- a localized string for the key, not null
-
get
Gets a localized string for the given key.If no localized string is available, the key is returned.
- Parameters:
key
- the localization key, not nullplaceholders
- the placeholders to insert into the string, may be null- Returns:
- a localized string for the key, not null
-
get
@Nonnull String get(@Nonnull String key, @Nullable Map<String, Object> placeholders, @Nullable Locale locale) Gets a localized string for the given key.If no localized string is available, the key is returned.
- Parameters:
key
- the localization key, not nullplaceholders
- the placeholders to insert into the string, may be nulllocale
- the preferred locale for the string, may be null- Returns:
- a localized string for the key, not null
-