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,
|
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>> {
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
use parse_args::parse_args;
|
use parse_args::parse_args;
|
||||||
use tracing_subscriber::fmt;
|
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.
|
// use this only if you want to run it as web application.
|
||||||
orbtk::initialize();
|
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")
|
Application::from_name("nwx.advotracker")
|
||||||
.theme(PolicyCheckState::theme())
|
.theme(PolicyCheckState::theme())
|
||||||
|
.localization(localization)
|
||||||
.window(|ctx| {
|
.window(|ctx| {
|
||||||
Window::new()
|
Window::new()
|
||||||
.title("AdvoTracker - DirectCall")
|
.title("AdvoTracker - DirectCall")
|
||||||
|
|||||||
Reference in New Issue
Block a user