Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

QString QLocale::name (  )  const

Returns the language and country of this locale as a string of the form "language_country", where language is a lowercase, two-letter ISO 639 language code, and country is an uppercase, two-letter ISO 3166 country code.

See also:
language(), country()

Definition at line 2174 of file qlocale.cpp.

References QString::append(), country(), and language().

{
    Language l = language();

    QString result = languageToCode(l);

    if (l == C)
        return result;

    Country c = country();
    if (c == AnyCountry)
        return result;

    result.append(QLatin1Char('_'));
    result.append(countryToCode(c));

    return result;
}


Generated by  Doxygen 1.6.0   Back to index