Add locales

This commit is contained in:
gabatxo1312 2026-01-30 18:23:54 +01:00
commit 362beac856
No known key found for this signature in database
22 changed files with 519 additions and 103 deletions

View file

@ -13,7 +13,13 @@ mod models;
mod routes;
pub mod state;
#[macro_use]
extern crate rust_i18n;
i18n!("locales", fallback = "en", minify_key = true);
pub fn build_app(state: AppState) -> Router {
rust_i18n::set_locale(&state.config.locale);
embed_assets!("assets", compress = true);
Router::new()