Struct oxygengine_core::localization::Localization
source · pub struct Localization { /* private fields */ }
Implementations§
source§impl 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§
source§impl Default for Localization
impl Default for Localization
source§fn 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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Initialize for Twhere
T: Default,
impl<T> Initialize for Twhere T: Default,
fn initialize(&mut self)
§unsafe fn initialize_raw(data: *mut ())
unsafe fn initialize_raw(data: *mut ())
Safety Read more