Results 1 to 6 of 6

Thread: Using Translations in Qt,QML

  1. #1
    Join Date
    Jul 2013
    Posts
    33
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Using Translations in Qt,QML

    Hi Guyz,

    I am using Translations in Qml with linguist ,lupdate and lrelease.It works fine. But my requirement is , when i have a string say "Hello" in different QML files say 100 places , i do not want to update the respective language string for that in each file.Hence the update should be done in one place so that it reflects everywhere.Currently i do not have much idea how to achieve this? Can anyone suggest the best approach ...

    Warm Regards
    Bala B

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Using Translations in Qt,QML

    I am not quite sure what you are asking for.

    Do you mean how to change the string in all QML files?
    Or do you mean how to change all translations for the same "source" string?

    Cheers,
    _

  3. #3
    Join Date
    Jul 2013
    Posts
    33
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: Using Translations in Qt,QML

    Hi

    its ur 2nd question...Here in my project i have a string named "Enter" in 1000 places in different QML files. I do not want to change the respective language string in each and every file. I need to change in one place so that it reflects in all the files. Hope i am clear to u now


    Regards
    Bala B

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Using Translations in Qt,QML

    linguist has a "search & translate" action, that allows you to search for a source string and replace all translations with the same one.

    Cheers,
    _

  5. #5
    Join Date
    Jul 2013
    Posts
    33
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: Using Translations in Qt,QML

    Thanks for the answer. I got it.

    I would like to know one more thing here.I want to store all my UI strings in a table or in an excel sheet , so that it would be easy for me to give that to end user . So that he will write respective language string in another column and use it. The main purpose of this is he does not need to use linguist everytime if a string needs to be changed.

    Hope you got my point. I am not sure how to start and where to start ?
    Please provide your thoughts

    Regards

  6. #6
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Using Translations in Qt,QML

    The "ts" file is an XML based format, you could write a tool that generates a spread sheet and which can also convert the spreadsheet back into ts.

    There is also lconvert which can convert between the TS format and other often used translation formats.

    if your translators are really just using a spreadsheet, they might actually like using a translation tool as it can make the translation process much easier.

    Cheers,
    _

Similar Threads

  1. language translations with Qt5.2
    By SSqt5.2 in forum Newbie
    Replies: 2
    Last Post: 4th August 2014, 09:15
  2. QLineEdit translations
    By plopes21 in forum Qt Programming
    Replies: 2
    Last Post: 9th March 2013, 15:17
  3. Translations in Qt
    By QbelcorT in forum Qt Programming
    Replies: 3
    Last Post: 4th April 2009, 01:44
  4. translations
    By anafor2004 in forum Newbie
    Replies: 5
    Last Post: 1st February 2008, 09:26
  5. namespaces and translations
    By gri in forum Qt Programming
    Replies: 3
    Last Post: 30th March 2007, 09:53

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.