From 57b4ecf10351ea177eb5989ebaeddee041d12eb4 Mon Sep 17 00:00:00 2001 From: Ivan <94743980+xzripper@users.noreply.github.com> Date: Fri, 10 May 2024 10:19:58 +0300 Subject: [PATCH] ReadMe. ReadMe. --- README.md | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4d8fe1c..2240a48 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,23 @@ -# jlocalizer -Minimalistic localization support for Java by Violent Studio. +

jlocalizer

+Minimalistic localization support for Java by Violent Studio.

Parsing localization pack: + +```java +Localization localization = new Localization(new LocalizationPack("localization.lpk")); // Initialize Localization with pack. + +localization.setDefaultLanguage("EN"); // Optional to set default language, but you will have to specify language in getString [getString(NAME, LANGUAGE)] + +if(localization.isLoaded()) { // It's optional to have that check, but just in case. + System.out.println(localization.getString("TITLE_0")); // Returns TITLE_IN_EN_0. Returns (null) if name or language not found in pack. +} +``` + +`localization.lpk`: +``` +EN:TITLE_0:TITLE_IN_EN_0 +RU:TITLE_0:TITLE_IN_RU_0 +UA:TITLE_0:TITLE_IN_UA_0 +``` + +Syntax: `LANGUAGE`:`NAME`:`STRING`. + +

JLocalizer v1.0.0