Skip to content
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

itom can now also set its language based on the operating system settings #287

Merged
merged 2 commits into from
Jun 4, 2024

Conversation

magro11
Copy link
Contributor

@magro11 magro11 commented May 2, 2024

Usually, the itom language must be explicitely set in the itom property dialog, while english is the default. Now, one can also select operating system as language. Then the current language of the operating system is read and an appropriate translation file for itom is searched. If not found, the fallback is the default language english.

For instance, itom also comes with a German translation with the generic code qitom_de. This file will then be found if the operating system language is German with all sub-specifications, like a Swiss or Austrian dialect, e.g. de, de_DE, de_AT, de_CH. For more information see the Qt documentation of QTranslator::load.

This PR is related to point 2 of the issue #285

…. Then, the current language of the operating system is used and an appropriate translation file for itom is searched. If no such a file could be found, itom falls back to its default language 'english'. If for instance a translation file for de is available, this file will be detected if the operating system language is for instance on of 'de', 'de_DE', 'de_CH'... (see Qt documentation of QTranslator::load).
@magro11 magro11 added the enhancement New feature or request label May 2, 2024
@twip-os
Copy link
Contributor

twip-os commented May 15, 2024

Perfect, this is exactly what we needed. Thank you very much.

@magro11 magro11 merged commit bc52fa9 into master Jun 4, 2024
@magro11 magro11 deleted the languageFromOperatingSystem branch June 4, 2024 19:43
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

Successfully merging this pull request may close these issues.

3 participants