LocaleManager QML Type

A singleton QML type for managing the system locale. More...

Import Statement: import QtDeviceUtilities.LocaleSettings 1.0

Properties

Detailed Description

There is no need to create an instance of this object. To use it, simply import the QtDeviceUtilities.LocaleSettings module.

The locale property holds the current system locale string. Pass it to Qt.locale() to retrieve locale-specific properties.

For example:

import QtQuick 2.6
import QtDeviceUtilities.LocaleSettings 1.0

Item {
    property var currentLocale: Qt.locale(LocaleManager.locale)
    Text { text: currentLocale.nativeLanguageName }
}

See also LocaleFilter and Locale.

Property Documentation

locale : string

Holds the system locale string in the format language_country, for example, "en_US".

See also QLocale::name().


© 2019 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.