integration of language translation in custom widget
i have developed custom widget and added into qtcreator. custom widget i have developed as text. i want to have option to display text in different language based on requirement. how can i achieve this. i found many tutorials on language translation in normal application but i want to achieve same in custom widget. how can i do that. can any one开发者_运维问答 suggest me how to proceed with this.
thanks in advance
The internationalization mechanism is the same for all texts with Qt. Use the tr() function and add the files with the translations (.ts files).
The following page will explain to you all you need to know to achieve internationalizationhttp://doc.qt.nokia.com/4.7/internationalization.html You can then dynamically translate your visible text using the change event.
精彩评论