Hi Christian, thanks for explaining the languageChanged signal, but setting i18n.language still doesn't seem to trigger dynamic translations with the current trunk.
I suspect calling setlocale isn't setting LANGUAGE at all, so it remains the same value, and gettext prioritizes that value of LANGUAGE over LANG and LC_*, so that the subsequent calls to i18n.tr() after languageChanged is emitted still use the old LANGUAGE.
In this MP, doing setenv("LANGUAGE", ...) only clobbers the variable in the current process, so it seems harmless as we're not actually changing the user's permanent LANGUAGE.
Hi Christian, thanks for explaining the languageChanged signal, but setting i18n.language still doesn't seem to trigger dynamic translations with the current trunk.
I suspect calling setlocale isn't setting LANGUAGE at all, so it remains the same value, and gettext prioritizes that value of LANGUAGE over LANG and LC_*, so that the subsequent calls to i18n.tr() after languageChanged is emitted still use the old LANGUAGE.
In this MP, doing setenv("LANGUAGE", ...) only clobbers the variable in the current process, so it seems harmless as we're not actually changing the user's permanent LANGUAGE.