Expand description
Β§π¬ Demo
Β§π Intro
i18nrs is a lightweight and powerful internationalization library for Wasm-based frameworks like Yew, Dioxus, and Leptos. It provides seamless tools to manage translations, change languages, and localize your applications.
Β§π€ Why Use i18nrs?
The following features make i18nrs a must-have for your Wasm-based projects:
- π Multi-Language Support: Easily integrate and manage multiple languages with flexible configurations.
- π Dynamic Language Switching: Switch languages on the fly and persist the choice using
LocalStorage
orSessionStorage
. - π¦ Simple Integration: Works seamlessly with Wasm frameworks like Yew, Dioxus, and Leptos.
- βοΈ JSON-Based Translations: Load and validate translations directly from JSON files.
- ποΈ Nested Key Translation: Organize translations with nested keys like
menu.file.open
. - π§ Auto RTL/LTR Switching: Automatically adjusts text direction based on the selected language, supporting Right-to-Left (RTL) languages such as Arabic and Hebrew.
This crate also includes a robust fallback system, supports nested key translation, and manages configuration centrally for efficient language handling.
Β§π Yew Usage
Refer to our guide for integrating i18nrs with your Yew app.
§𧬠Dioxus Usage
Refer to our guide for integrating i18nrs with your Dioxus app.
Β§π± Leptos Usage (TODO)
Refer to our guide for integrating i18nrs with your Leptos app.
Β§π€ Contributions
Contributions are welcome! Whether itβs bug fixes, feature requests, or adding support for new frameworks, we would love your help to make i18nrs better.
- Fork the repository.
- Create a new branch for your feature/bugfix.
- Submit a pull request for review.
Β§π License
i18nrs is licensed under the MIT License. You are free to use, modify, and distribute this library in your projects.
Re-exportsΒ§
pub use config::I18n;
pub use config::I18nConfig;
pub use config::StorageType;