Code review comment for lp:~attente/ubuntu-ui-toolkit/1263163

Revision history for this message
William Hua (attente) wrote :

It seems that /usr/share/language-tools/save-to-pam-env is setting the value of LANGUAGE in the user's .pam_environment. We can try removing that, but we still have the issue that if the user's LANGUAGE is ever set manually, dynamic language switching will not work. As far as I can see, there is no way to make gettext() calls for a specific language, which means we would have to set the variable manually to get it to work...

David, yes, doing setenv("LANGUAGE", ...) will only affect the one process that it is called in. My plan was to add a handler to detect when the user's accountsservice language changes, and set i18n.language whenever that happens. I believe this would allow all apps to re-translate when the language is changed in ubuntu-system-settings, but again, that behaviour would depend on this getting merged.

« Back to merge proposal