开发者

language translation using variable

i need to have language translation to user entered text(dynamic property).

mean to say in my custom widget i provide one dynamic prope开发者_如何学Gorty to select language from list of languages and one more dynamic property to enter text.

say for example user enters some text and selects language "dutch" that particular string should be translated to dutch.

i have achieved language translation of static string ( mean to say i have directly entered text in tr() with out dynamic property to enter text).

so can some one suggest me how do i achieve the same with dynamic property ( dynamic property with respect to text). "is there any way to set language for strings not enclosed in tr()"

thanks in advance for any help.


You can use QTranslator. But it shouldn't translate any string, only string it is able to find in a translation file. Translation files are created using Qt Linguist.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜