1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! # modo::i18n
//!
//! YAML-backed internationalization with request-scoped locale resolution.
//!
//! Provides:
//! - [`I18n`] — factory that loads translations and builds the Tower layer.
//! - [`I18nConfig`] — serde-deserialised configuration with sensible defaults.
//! - [`I18nLayer`] — Tower middleware that resolves the locale and injects a
//! [`Translator`] into request extensions.
//! - [`Translator`] — axum extractor with `t()` / `t_plural()` helpers.
//! - [`TranslationStore`] — `Arc`-wrapped in-memory store of loaded entries.
//! - [`LocaleResolver`] trait plus built-in resolvers [`QueryParamResolver`],
//! [`CookieResolver`], [`SessionResolver`], and [`AcceptLanguageResolver`].
//! - [`make_t_function`] — builds the MiniJinja `t()` function wired up by
//! [`crate::template`].
//!
//! ## Quick start
//!
//! ```rust,no_run
//! use modo::i18n::{I18n, I18nConfig};
//!
//! # fn example() -> modo::Result<()> {
//! let i18n = I18n::new(&I18nConfig::default())?;
//! let router: axum::Router = axum::Router::new().layer(i18n.layer());
//! # let _ = router;
//! # Ok(())
//! # }
//! ```
pub use I18nConfig;
pub use Translator;
pub use I18n;
pub use I18nLayer;
pub use ;
pub use ;