Trouble with text translation #3243
-
Hi, I wanted to use the Slint translation system by following the documentation (https://slint.dev/releases/1.1.1/docs/slint/src/concepts/translations). Unfortunately I can't get the strings translated, I also followed the "gallery" example (https://github.com/slint-ui/slint/blob/master/examples/gallery/) without success. I checked to see if it was my code that was the problem, but to my great surprise, when I cloned the "gallery" exemple, the string translation didn't appear either. I'm verry confused, does anyone have anyclue on what i'm doing wrong? (I'm sorry for any mistakes or misunderstandings, English isn't my first language.) Here's the projects files: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi! Are you running your app on Linux? What do you see if you try to run If you don't see any translations then in my experience (after trying this) it's sometimes related to |
Beta Was this translation helpful? Give feedback.
I also tried your example now and it works for me on macOS if I set
LANG=fr
, with one caveat:In your
src/main.rs
you initialise the base directory for your translations to be next to the executable:If I run with
cargo run
, the executable will be intarget/debug/gmod_3d_packager
and consequently slint will try to look for translationstarget/debug/lang
- which doesn't exist.You can either copy the executable out of there into the root, or (for the purpose of development) use