3 releases

0.1.2 Oct 25, 2021
0.1.1 Oct 24, 2021
0.1.0 Oct 17, 2021

#34 in Internationalization (i18n)

ISC license

770 lines


Crates.io dependency status docs.rs CI

rosetta-i18n is an easy-to-use and opinionated Rust internationalization (i18n) library powered by code generation.


println!(Lang::En.hello("world"));  // Hello, world!



  • No runtime errors. Translation files are parsed at build time, so your code will never fail due to translations anymore.
  • No dependencies. This crate aims to have the smallest runtime overheat compared to raw strings. There is no additional dependencies at runtime.
  • Standard JSON format. Translations are written in JSON file with a syntax used by many other i18n libraries. Therefore, most translation services support it out of the box.
  • String formatting is supported.


Rosetta is separated into two crates, rosetta-i18n and rosetta-build. To install both, add the following to your Cargo.toml:

rosetta-i18n = "0.1"

rosetta-build = "0.1"


The documentation is available on https://baptiste0928.github.io/rosetta/.

You can also read the API documentation on docs.rs: rosetta-i18n and rosetta-build.


There is no particular contribution guidelines, feel free to open a new PR to improve the code. If you want to introduce a new feature, please create an issue before.


~42K SLoC