Skip to content

I want to compile a krokiet that uses translations from other languages. How should I do it? #1284

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
chensimmons opened this issue May 14, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@chensimmons
Copy link

Feature Description

My English is very poor, I want to compile a krokiet with a non-English interface, what would I probably have to do?

@chensimmons chensimmons added the enhancement New feature or request label May 14, 2024
@qarmin
Copy link
Owner

qarmin commented Sep 30, 2024

It is not possible yet - slint-ui/slint#3715

@Uzume
Copy link

Uzume commented Jan 15, 2025

@qarmin: Can't you use the old method based upon a global callback and projectfluent/fluent-rs as mentioned/alluded to in that issue thread at: slint-ui/slint#3715 (comment)?

If you do not like that, bundled translations without gettext are still officially supported.

So you should be able to use translations without gettext, the question is whether you want to use the new slint translation syntax (i.e., @tr macro) and their officially supported bundled translations or use a slightly more cumbersome syntax and still leverage fluent and the existing czkawka translation architecture/content in a manner akin to #469 (especially if you name the global callback fl although tr seems nice too; maybe even tr.fl leaving room for other potential translation systems).

@qarmin
Copy link
Owner

qarmin commented May 3, 2025

I used a slightly different approach.
I implemented a Translations singleton that gets updated each time the language changes. All properties within it are linked to translatable elements in the GUI and this will be available in next version

@qarmin qarmin closed this as completed May 3, 2025
@Uzume
Copy link

Uzume commented May 9, 2025

Yes, I see such support added with #1508 and the actual translations moved to that interface with #1513. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants