Struct oxygengine_core::localization::Localization
source · [−]pub struct Localization { /* private fields */ }
Implementations
sourceimpl Localization
impl Localization
pub fn default_language(&self) -> Option<&str>
pub fn set_default_language(&mut self, value: Option<String>)
pub fn current_language(&self) -> Option<&str>
pub fn set_current_language(&mut self, value: Option<String>)
pub fn add_text(&mut self, id: &str, language: &str, text_format: &str)
pub fn remove_text(&mut self, id: &str, language: &str) -> bool
pub fn remove_text_all(&mut self, id: &str) -> bool
pub fn remove_language(&mut self, lang: &str)
pub fn find_text_format(&self, id: &str) -> Option<&str>
pub fn format_text(
&self,
id: &str,
params: &[(&str, &str)]
) -> Result<String, String>
Trait Implementations
sourceimpl Default for Localization
impl Default for Localization
sourcefn default() -> Localization
fn default() -> Localization
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for Localization
impl Send for Localization
impl Sync for Localization
impl Unpin for Localization
impl UnwindSafe for Localization
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more