C

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().


Available under certain Qt licenses.
Find out more.