-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ReadMe.
- Loading branch information
Showing
1 changed file
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,23 @@ | ||
# jlocalizer | ||
Minimalistic localization support for Java by Violent Studio. | ||
<h1 align="center">jlocalizer</h1> | ||
Minimalistic localization support for Java by Violent Studio.<br><br>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`. | ||
|
||
<hr><p align="center">JLocalizer v1.0.0</p> |