pub fn init<T: RustEmbed>(default_locale: &str)
Expand description
Init I18n locales assets from Rust Embed and setup default_locale.
This method only init asset dictionary once, when Assets has been initialized, just update default_locale.
ⓘ
use rust_embed::RustEmbed;
// Use RustEmbed to locale assets
#[derive(RustEmbed)]
#[folder = "locales/"]
#[include = "*.yml"]
struct Asset;
loon_embed::init::<Asset>("en");