[−][src]Trait subor_rs::localization_service_s_d_k_services::TLocalizationServiceSyncClient
Required methods
fn switch_language(
&mut self,
language: String,
load_all_context: bool,
remove_old: bool
) -> Result<bool>
&mut self,
language: String,
load_all_context: bool,
remove_old: bool
) -> Result<bool>
Switch language to specified one.
fn get_current_language(&mut self) -> Result<String>
Get currently active language
fn switch_context(&mut self, context: String, language: String) -> Result<bool>
Switch a context of the language.
fn hint_context(&mut self) -> Result<String>
Get currently active context.
fn get_string(
&mut self,
key: String,
context: String,
language: String
) -> Result<String>
&mut self,
key: String,
context: String,
language: String
) -> Result<String>
Get a localization string. Return: localization string.
fn get_strings(
&mut self,
filter: String,
context: String,
language: String
) -> Result<BTreeMap<String, String>>
&mut self,
filter: String,
context: String,
language: String
) -> Result<BTreeMap<String, String>>
Get a set of localization string.
fn get_file_name(
&mut self,
filename: String,
is_virtual_path: bool,
context: String
) -> Result<String>
&mut self,
filename: String,
is_virtual_path: bool,
context: String
) -> Result<String>
Get the file name/path in the language.
The search will go through the context and its sub context to find the file name. Eg. If file name is not found in context com.ruyi, then the search will go on to find it in com.ruyi.moduleA and com.ruyi.moduleB.
Implementors
impl<C: TThriftClient + TLocalizationServiceSyncClientMarker> TLocalizationServiceSyncClient for C
[src]
fn switch_language(
&mut self,
language: String,
load_all_context: bool,
remove_old: bool
) -> Result<bool>
[src]
&mut self,
language: String,
load_all_context: bool,
remove_old: bool
) -> Result<bool>
fn get_current_language(&mut self) -> Result<String>
[src]
fn switch_context(&mut self, context: String, language: String) -> Result<bool>
[src]
fn hint_context(&mut self) -> Result<String>
[src]
fn get_string(
&mut self,
key: String,
context: String,
language: String
) -> Result<String>
[src]
&mut self,
key: String,
context: String,
language: String
) -> Result<String>
fn get_strings(
&mut self,
filter: String,
context: String,
language: String
) -> Result<BTreeMap<String, String>>
[src]
&mut self,
filter: String,
context: String,
language: String
) -> Result<BTreeMap<String, String>>
fn get_file_name(
&mut self,
filename: String,
is_virtual_path: bool,
context: String
) -> Result<String>
[src]
&mut self,
filename: String,
is_virtual_path: bool,
context: String
) -> Result<String>