diff --git a/advotracker/src/main.rs b/advotracker/src/main.rs index ad140e5..dce0ab5 100644 --- a/advotracker/src/main.rs +++ b/advotracker/src/main.rs @@ -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> { use parse_args::parse_args; use tracing_subscriber::fmt; @@ -100,8 +103,15 @@ fn main() -> Result<(), Box> { // 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")