Important: Please read the Qt Code of Conduct -

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

  • Hi,

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

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

    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;;   // == "de_DE"
    //l = QLocale(QString::fromLatin1("nn_NO"));

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


  • 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...

Log in to reply