How to load qt linguist dynamically changed label text
In my project i'm trying to use qt linguist. When i change the language fr开发者_C百科om English to Turkish, it is working all constant label.
But some labels i m loading them dynamically according to scenario of use cases.
Whatever i do with qt linguist, it doest workthe texts of these label.
How can i get rid of this problem?
Any help will be apprecialted
Qt has a guide to internationalization, which includes the basic information: to wrap your string in a tr
function call.
label->setText( tr( "Hello, World!" ) );
In addition to this, if you want the language to change on the fly, you'll need to identify when the context has changed, and update your labels appropriately. Unfortunately, I can't easily put my hands on the signal that indicates when to do so.
精彩评论