About this project
Localizer is a tool to translate text using json files.
Installing
Run the following command to add the package to your dependencies:
Git
To clone the repository locally using git run git clone https://github.com/ElBe-Development/localizer-rs.git
.
Usage
To use localizer-rs, you need a directory (eg. translations
) with your translations files (eg. en.json
). You then need to follow these steps:
-
Import the localizer-rs crate:
use localizer_rs;
-
Create a new config object:
let config = new;
-
Translate your text:
!; t
Example
With the following en.json
file.
And the following rust code.
use localizer_rs;
You will get the following output:
Where Error:
is red and bold.
Contact
To contact us, get help or just chat with others, you can visit our discord server.