Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Language transulation

Language transulation

Scheduled Pinned Locked Moved General and Desktop
8 Posts 3 Posters 3.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anveshkumar
    wrote on last edited by
    #1

    I am beginner to Qt5.1.0.mingw48_32 .I am writing in Qt5 creator c++ GUI programming. i dont know about QtQML. Can any one tell how to change input string(in English) which has taken from "Qline edit" and translate that into another language(to Hindi and tamil) and write that on "QLabel" .I studied all links by Qt but i could not get the solution .How to start that process of programming to convert input string from one language to another language? please help me .

    1 Reply Last reply
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi, welcome to devnet.

      Please refer to the "Developers":http://qt-project.org/doc/qt-5/linguist-programmers.html section of the "Qt Linguist":http://qt-project.org/doc/qt-5/qtlinguist-index.html manual.
      There's a step by step introduction to the topic.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        ScottR
        wrote on last edited by
        #3

        Google translate and Bing (possibly others) have APIs.

        Do a google search for "Google translate API" or "Bing translate API".

        1 Reply Last reply
        0
        • A Offline
          A Offline
          Anveshkumar
          wrote on last edited by
          #4

          Thnks for reply...There all telling .ts files and send to Qt Linguist .When i am trying i cant get my language and that i have to enter my language and save.How can i get my text transulate with out entering my local text again? pleas help me i am new to Qt5.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Anveshkumar
            wrote on last edited by
            #5

            please Can you provide any sample code with explination. thnks in regards .

            1 Reply Last reply
            0
            • Chris KawaC Offline
              Chris KawaC Offline
              Chris Kawa
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Yeah, sorry, I misread your question. I thought you wanted to provide multi-lingual ui but what you seem to need is a basic translator app.

              Qt is not a translation library so there's no such functionality in it.
              As ScottR suggested you should use some other service for this.

              In pseudocode this would be something like this:
              @
              QString textToTranslate = ui.yourLineEdit->text();
              QString translatedText = WhateverTranslationLibraryFunction(textToTranslate, "language A", "language B");
              ui.yourLabel->setText(translatedText);
              @

              But again, this has little to do with Qt.

              1 Reply Last reply
              0
              • A Offline
                A Offline
                Anveshkumar
                wrote on last edited by
                #7

                Thnks for reply @chris kawa. i understood what u told.but while i am studying documentation diffrent people telling diffrent things for language changing.
                please can you please explain WhateverTranslationLibraryFunction(textToTranslate, "language A", "language B");
                this line. i am not geting this.please dont mind for my simple questions .i am now lerning Qt.

                1 Reply Last reply
                0
                • Chris KawaC Offline
                  Chris KawaC Offline
                  Chris Kawa
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  It doesn't matter that you're new to Qt because this is not a Qt question.
                  The only Qt part is getting the text from ui and setting it back, which I showed.

                  As for the translation itself you will need to employ some other library. The line with WhateverTranslationLibraryFunction is just a placeholder. It will be totally different depending on what library you actually use.

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved