main: include orbtk ron based localization
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
@@ -37,6 +37,9 @@ struct Environment {
|
||||
rust_log: String,
|
||||
}
|
||||
|
||||
// German localization file.
|
||||
static ADVOTRACKER_DE_DE: &str = include_str!("../locales/advotracker_de_DE.ron");
|
||||
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
use parse_args::parse_args;
|
||||
use tracing_subscriber::fmt;
|
||||
@@ -100,8 +103,15 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
// use this only if you want to run it as web application.
|
||||
orbtk::initialize();
|
||||
|
||||
// if no dictionary is set for the default language e.g. english the content of the text property will drawn.
|
||||
let localization = RonLocalization::create()
|
||||
.language("en_US")
|
||||
.dictionary("de_DE", ADVOTRACKER_DE_DE)
|
||||
.build();
|
||||
|
||||
Application::from_name("nwx.advotracker")
|
||||
.theme(PolicyCheckState::theme())
|
||||
.localization(localization)
|
||||
.window(|ctx| {
|
||||
Window::new()
|
||||
.title("AdvoTracker - DirectCall")
|
||||
|
||||
Reference in New Issue
Block a user