slint-ui / slint

Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
https://slint.dev
Other
17.56k stars 604 forks source link

Add support for translations on Windows #3307

Open tronical opened 1 year ago

tronical commented 1 year ago

Support for translations via gettext is currently not supported on Windows.

This is due to a couple of issues:

  1. We have #[cfg(...)] in place on our end to disable gettext-rs.
  2. Even with those out of the way, gettext-rs on Windows requires tools such as tar to be installed in the path. See also https://github.com/Koka/gettext-rs/issues/12
  3. It's unclear how initialisation the locale works without locale definitions.

Instead, it might make more sense to switch to gettext. Then however the burden is on on us to locale the correct .mo files.

Enyium commented 3 months ago

The Slint language documentation should mention that @tr() currently doesn't work on Windows.