Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. "choose file" as text in the <input type=file /> control - how to change language?
Forum Update on Monday, May 27th 2025

"choose file" as text in the <input type=file /> control - how to change language?

Scheduled Pinned Locked Moved Qt WebKit
2 Posts 1 Posters 5.1k 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.
  • P Offline
    P Offline
    privet
    wrote on 7 Jun 2011, 10:56 last edited by
    #1

    Hi,

    I have a German localized computer.
    I have a html file:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//DE">
    <html>
    <head>
    <meta http-equiv="content-language" content="de">
    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
    </head>
    <body>
    <input type="file">
    </body>
    </html>

    and expect to have a German text in the upload control within my QWebView.
    But this is not the case, it is always english "Choose file - no file selected".
    The following code doesn't help too:

    QLocale l = QLocale::system&#40;&#41;;   //l.name() == "de_DE"
    //l = QLocale(QString::fromLatin1("nn_NO"));
    myqwebview->setLocale(l);
    

    It is possible to change the displayed text in the upload control?

    Ciao
    privet

    1 Reply Last reply
    0
    • P Offline
      P Offline
      privet
      wrote on 7 Jun 2011, 12:17 last edited by
      #2

      additional information:
      the navigator.userAgent is German too:
      "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE) AppleWebKit/533.3 (KHTML, like Gecko) myqwebview/1.0.0 Safari/533.3"

      So, the .exe knows that the locale should be German...

      1 Reply Last reply
      0

      1/2

      7 Jun 2011, 10:56

      • Login

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