This is a java project that allows the user to read language files to retrieve strings use in their program
This project is licensed under the MIT license
- Click here to find the latest release.
Download the jar or the src files and add them to youre project- You could also download the whole project at this current version
- Using git shell or a such like program cd to project directory and
run the command
git submodule add https://github.com/GOGO98901/language-file-reader.git languageUtils
.
Then add the src folder to your project
The examples given are using the example lang file. View the example java file here.
To load the language file use
LanguageFile enUK = new LanguageFile("en_UK.lang");
LangUtil.setLanguageFile(enUK);
LangUtil.readLanguageFile();
or
LanguageFile enUK = new LanguageFile("en_UK.lang");
LangUtil.setLanguageFileAndRead(enUK);
and then to print your strings use
String title = LangUtil.get("net.roryclaasen.title");
System.out.println(title);
You can also hard code phrases using
LangUtil.addHardcodeString(key, phrase);
en_UK.lang
net.roryclaasen.title=Language File Reader
test.1.example=Testing 1 2 3