public abstract class Language extends Object
Modifier and Type | Field and Description |
---|---|
private static Gson |
GSON |
private static Language |
instance |
private static Logger |
LOGGER |
private static Pattern |
TOKEN_PATTERN |
Constructor and Description |
---|
Language() |
Modifier and Type | Method and Description |
---|---|
private static Language |
create() |
abstract String |
get(String key) |
static Language |
getInstance() |
abstract boolean |
hasTranslation(String key) |
abstract boolean |
isRightToLeft() |
static void |
load(InputStream inputStream,
BiConsumer<String,String> entryConsumer) |
List<OrderedText> |
reorder(List<StringVisitable> texts) |
abstract OrderedText |
reorder(StringVisitable text) |
static void |
setInstance(Language language) |
private static final Logger LOGGER
private static final Gson GSON
private static final Pattern TOKEN_PATTERN
private static volatile Language instance
private static Language create()
public static void load(InputStream inputStream, BiConsumer<String,String> entryConsumer)
public static Language getInstance()
@Environment(value=CLIENT) public static void setInstance(Language language)
public abstract boolean hasTranslation(String key)
@Environment(value=CLIENT) public abstract boolean isRightToLeft()
@Environment(value=CLIENT) public abstract OrderedText reorder(StringVisitable text)
@Environment(value=CLIENT) public List<OrderedText> reorder(List<StringVisitable> texts)