6 releases

0.2.0 Apr 21, 2024
0.1.4 Sep 2, 2023
0.1.3 May 27, 2023
0.1.2 Mar 1, 2023
0.1.0 Feb 26, 2023

#94 in Internationalization (i18n)

MIT license

46KB
660 lines

LocaLoco

LocaLoco is a library that aims to provide internationalization functionality to the Rust programming language. It use a binary format to store the internationalization strings data, which can be compiled from a json file.


lib.rs:

LocaLoco

Localoco is a simple library that brings the ability of translating strings to your application. The core of it is to use a translation key to replace the string to be displayed and then load a specified strings file (according to the language/region settings).

To ensure the loading of the so-called "string file" is fast, we compile it into a binary form so that it will be easier to parse at runtime. This work could be done as your Rust code being compiled. The strings file will be originally written in json, which is a human-readable text format, and finally transpiled into a binary form, being ready to be loaded at runtime.

Dependencies

~145KB