pub trait LanguageAppExt {
// Required methods
fn set_lang_i18n(&mut self, locale: &str);
fn set_fallback_lang(&mut self, locale: &str);
}Expand description
Extension trait for App to easily manage languages.
Provides convenient methods to set current and fallback languages
directly on the Bevy App.
§Example
use bevy::prelude::*;
use bevy_intl::LanguageAppExt;
fn setup_language(mut app: ResMut<App>) {
app.set_lang_i18n("fr");
app.set_fallback_lang("en");
}Required Methods§
Sourcefn set_lang_i18n(&mut self, locale: &str)
fn set_lang_i18n(&mut self, locale: &str)
Sets the current language for translations.
Warns if the language is not available in loaded translations.
Sourcefn set_fallback_lang(&mut self, locale: &str)
fn set_fallback_lang(&mut self, locale: &str)
Sets the fallback language for translations.
Warns if the fallback language is not available in loaded translations.