[bt-devel] Language Setting

Jaak Ristioja jaak at ristioja.ee
Wed Jan 16 07:02:07 MST 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 16.01.2013 15:13, John B. Turpish wrote:
> Forgive me if this is obvious to everyone else. Why does the
> language setting not affect the interface (the menus, for example)?
> I tried out a simple change just to see that it worked, and it did
> (of course it didn't take effect until I restarted BT, and I was
> using the AnyCountry default arg which is probably wrong...)
> 
> I think I can come up with some realistic use cases where that
> would be valuable in and of itself, but it also seems to be a
> prerequisite before we can talk about dynamic translation, wouldn't
> you think? What's the point of retranslating at runtime if the user
> has now way to trigger that?

We have not yet implemented triggering this at runtime because we
don't want to release an incomplete feature i.e. all strings not being
translated.

You're welcome to implement this for testing purposes. The process
goes something like this:

1) Mess with qApp->installTranslator() and/or qApp->removeTranslator()
to install and activate the new translator. Afaik such calls broadcast
QEvent::LanguageChange events to all widgets.

2) Catch the event in all subwidgets like this:

    void MyWidget::changeEvent(QEvent * e) {
        if (e->type() == QEvent::LanguageChange)
            retranslateUi();
    }

Blessings,
Jaak
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iQgcBAEBAgAGBQJQ9rLTAAoJEEqsYmEt1rCOFcA//0ZOfw8OI7WhD5dt0ZQz+bJF
FDw04TOEmpTP891H4MN2bWoCMHfT7fcsWbsfl44xDUi9nJNw/Dd5vKPVQJ5YGK3N
13/iLEVvspsSbnGDA+RYPOV7zi89J2EoQ4Ar+6l7olYGuWA9puo0v9E75hWPUV/l
RdaXvIjHx+hWLHb5x21FeoAy3Ls7eD2jMjIAC9lmGclYXAFUdIDD89dQEyVxIRhk
d831hBe/MVX7n07exiP1EHbqlcVCW7R1KioIT2RJkHWKz6crGT0DSXjUIfGNFCzg
I6jCnzx3OfoZkSvdyhPUNwahCXtKGwpAfkCRUSABoqvBCryJzUuJ8qOA6ZSATV5C
Ae6SloNjcV8zzifaSwjv+3b6P1K0tyUeNPvQQ8YObTnSd1J5kvFwkCw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2liVb4tyH84
2LrPqObmNs0555wo6iWbqL/ZNuGjeM3+ctwCh203S56e4KqporhCKuaNy1lfbp9B
gcokY33thia28D7gg2UOd1twjA0o6vkoiCzfhGfgXBW8ifv9i/3xqo83jI2J7lST
XcGTKnYNlScXLCEE3F+G1vJmnTyIHPmMsQYtXC7i6bcLsLkGD1kP/vggIGawdNpX
5vyur90Urtr/a6QwJPAr
=YG8S
-----END PGP SIGNATURE-----



More information about the bt-devel mailing list