Struct l20n::Locale
[−]
[src]
pub struct Locale { /* fields omitted */ }
Deprecated
: Look at https://github.com/projectfluent/fluent-rs instead.
A Locale contains all the resources for a specific language.
Methods
impl Locale
[src]
fn new() -> Locale
[src]
Deprecated
: Look at https://github.com/projectfluent/fluent-rs instead.
Creates a new empty Locale.
fn add_resource(&mut self, res: &str) -> Result<(), ParseError>
[src]
Deprecated
: Look at https://github.com/projectfluent/fluent-rs instead.
Add a L20n string resource, and it will be parsed.
fn localize<T: Deserialize>(&self) -> LocalizeResult<T>
[src]
Deprecated
: Look at https://github.com/projectfluent/fluent-rs instead.
Resolves all the resouces into Strings, and returns a Deserialize object of your choosing.
fn localize_data<T: Deserialize, D: Serialize>(
&self,
data: D
) -> LocalizeResult<T>
[src]
&self,
data: D
) -> LocalizeResult<T>
Deprecated
: Look at https://github.com/projectfluent/fluent-rs instead.
Same as localize
, but you provide environment Data for the L20n
files to use.