Crate bi18n

Crate bi18n 

Source

Macros§

i18n
Convenience macro for i18n* functions /!\ Theses functions can panic on error, if you’re unsure, use the try_* functions
try_i18n
Convenience macro for try_i18n* functions

Structs§

I18n
Key
Locale
LocaleNotFound

Functions§

add
Sets the current i18n if empty, else saves it
free
Removes the current i18n and all saved ones
i18n_current
Fetches the translation corresponding to the given key in the currently saved i18n Panics if not found, use try_i18n_current if you’re not sure
i18n_with_locale
Fetches the translation corresponding to the given key and given locale in all saved i18n (current & saved) Panics if not found, use try_i18n_with_locale if you’re not sure
set
set_language
Tries to swap the current i18n with a saved one corresponding to the given Locale
try_get_locale
Tries to fetch the locale of the current i18n
try_i18n_current
Tries to fetch the translation corresponding to the given key in the currently saved i18n
try_i18n_with_locale
Tries to fetch the translation corresponding to the given key and given locale in all saved i18n (current & saved)