Relative Content

Tag Archive for python-3.xtranslationgettextpyqt6

How to switch gettext language live in PyQt6

I am currently working on a Linux-native GUI for 7-zip and have already completed the menu and toolbar. In them are of course a lot of text snippets that I translate using gettext. It is possible to switch the language of gettext live (just call the .install() method of the wanted translation), but I am stuck on how to update the labels on all the buttons to reflect that change of language in the background, instead of just having new dialogs be in the newly-selected language until the program is restarted.