Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Change the language of "QML Map Element"
Forum Updated to NodeBB v4.3 + New Features

Change the language of "QML Map Element"

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 3 Posters 2.4k Views 1 Watching
  • 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.
  • N Offline
    N Offline
    njduck
    wrote on last edited by
    #1

    I'm a Chinese.
    I found that if I use an official offline OVI Map on my Nokia device.
    The language of the map is Chinese.
    But the Language is allways in English while I develop a soft base on QtQuick QML Map Element.

    @
    Map {
    id: map
    opacity: 1
    anchors.fill: parent
    size.width: parent.width
    size.height: parent.height
    zoomLevel: 10

            center: Coordinate {latitude: 39.90735; longitude: 116.39125}
            connectivityMode: Map.OnlineMode
            mapType: Map.StreetMap
    
            plugin: Plugin {name: "nokia"}
       }
    

    @

    Is there any way to change the map language?
    BTW, Is there any other value of the Plugin name?

    1 Reply Last reply
    0
    • C Offline
      C Offline
      cmer4
      wrote on last edited by
      #2

      njduck Nin Hao;)

      I had the similar issue with Russian - so Russian turns on when your device's locale is set to Russian. Could you try please your code ensuring your device is set to China locale?

      1 Reply Last reply
      0
      • N Offline
        N Offline
        njduck
        wrote on last edited by
        #3

        [quote author="cmer4" date="1319784676"]njduck Nin Hao;) I had the similar issue with Russian - so Russian turns on when your device's locale is set to Russian. Could you try please your code ensuring your device is set to China locale?[/quote]

        3ks cmer4.
        I'm not familiar with Nokia device.
        Could u please tell me how to set the locale?
        I have one Nokia C6-01 and one Nokia 5800w XpressMusic.

        1 Reply Last reply
        0
        • Y Offline
          Y Offline
          yangzl
          wrote on last edited by
          #4

          i have set it ,but it always english.

          @
          #include <QtGui/QApplication>
          #include "mainwindow.h"
          #include <QLocale>
          #include <QSplashScreen>

          int main(int argc, char *argv[])
          {
          QApplication a(argc, argv);
          QSplashScreen *splash = new QSplashScreen;
          splash->setPixmap(QPixmap(":/splash.png"));
          splash->show();
          splash->showMessage("Loaded modules");
          // QLocale lo(QLocale::China, QLocale::Chinese);
          QLocale::setDefault(QLocale(QLocale::Chinese, QLocale::China));
          // QLocale::setDefault(&lo);
          qDebug() << "china";
          qDebug() << QLocale::system().language();
          MainWindow w;
          #if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE_WM) || defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
          // w.setControlsVisible(false);
          w.showMaximized();
          #else
          w.show();
          qDebug() << "splash";
          splash->showMessage("Established connections");
          splash->finish(&w);
          #endif
          return a.exec();
          }
          @

          [EDIT: code formatting, please wrap in @-tags, Volker]

          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