i18n Internationalization

Hikari's internationalization system supports multiple language switching with full RTL (Right-to-Left) support.

Supported Languages

LanguageCodeDirection
Englishen-USLTR
Simplified Chinesezh-CHSLTR
Traditional Chinesezh-CHTLTR
Frenchfr-FRLTR
Russianru-RULTR
Spanishes-ESLTR
Arabicar-SARTL
Japaneseja-JPLTR
Koreanko-KRLTR

Basic Usage

(live preview unavailable)

Language Switching

(live preview unavailable)

RTL Support

For RTL languages like Arabic, the I18nProvider automatically sets dir="rtl":

rust
1
2
3
4
5
6
7
8
9
10
11
use tairitsu_web::i18n::{I18nProvider, context::Language};

fn App() -> Element {
    rsx! {
        I18nProvider {
            language: Language::Arabic,  // Automatically RTL
            toml_content: AR_SA_TOML,
            YourApp {}
        }
    }
}

Layout components automatically adapt to RTL direction.

API

PropertyDescriptionTypeDefault
languageCurrent languageLanguageEnglish
toml_contentTranslation content&str-
directionLayout direction (ThemeProvider)"ltr" \"rtl""ltr"