KLocale
#include <klocale.h>
Inherited by KGlobal::LocaleWrapper.
Static Public Member Functions | |
static QString | defaultCountry () |
static QString | defaultCurrencyCode () |
static QString | defaultLanguage () |
static KLocale * | global () |
static void | splitLocale (const QString &locale, QString &language, QString &country, QString &modifier, QString &charset) |
Detailed Description
KLocale provides support for language and country specific stuff.
KLocale supports specifying the format for numbers, currency, time, and date.
Use KLocale::global() to get pointer to the global KLocale object, containing the applications current locale settings.
For example, to format the date May 17, 1995 in the current locale, use:
class for supporting locale settings
- Deprecated:
- since 5.0. For translation support use KLocalizedString (from the KI18n framework); for string formatting use QLocale() or KFormat (from the KCoreAddons framework) if QLocale doesn't provide the formatting you need. For more information about porting code that is still using KLocale see: https://community.kde.org/Frameworks/Porting_Notes#Localization
Member Enumeration Documentation
◆ BinarySizeUnits
These binary units are used in KDE by the formatByteSize() functions.
NOTE: There are several different units standards: 1) SI (i.e. metric), powers-of-10. 2) IEC, powers-of-2, with specific units KiB, MiB, etc. 3) JEDEC, powers-of-2, used for solid state memory sizing which is why you see flash cards labels as e.g. 4GB. These (ab)use the metric units. Although JEDEC only defines KB, MB, GB, if JEDEC is selected all units will be powers-of-2 with metric prefixes for clarity in the event of sizes larger than 1024 GB.
Although 3 different dialects are possible this enum only uses metric names since adding all 3 different names of essentially the same unit would be pointless. Use BinaryUnitDialect to control the exact units returned.
- Since
- 4.4
- See also
- binaryUnitDialect
◆ BinaryUnitDialect
This enum chooses what dialect is used for binary units.
Note: Although JEDEC abuses the metric prefixes and can therefore be confusing, it has been used to describe memory sizes for quite some time and programs should therefore use either Default, JEDEC, or IEC 60027-2 for memory sizes.
On the other hand network transmission rates are typically in metric so Default, Metric, or IEC (which is unambiguous) should be chosen.
Normally choosing DefaultBinaryDialect is the best option as that uses the user's selection for units.
- Since
- 4.4
Enumerator | |
---|---|
DefaultBinaryDialect | Used if no specific preference. |
IECBinaryDialect | KDE Default, KiB, MiB, etc. 2^(10*n) |
JEDECBinaryDialect | KDE 3.5 default, KB, MB, etc. 2^(10*n) |
MetricBinaryDialect | SI Units, kB, MB, etc. 10^(3*n) |
◆ CalendarSystem
- Since
- 4.6
Available Calendar Systems
- See also
- setCalendarSystem()
- calendarSystem()
Enumerator | |
---|---|
GregorianCalendar | |
CopticCalendar | Coptic Calendar as used Coptic Church and some parts of Egypt. |
EthiopianCalendar | Ethiopian Calendar, aka Ethiopic Calendar. |
HebrewCalendar | Hebrew Calendar, aka Jewish Calendar. |
IslamicCivilCalendar | Islamic Civil Calendar, aka Hijri, not the Lunar Calendar. |
IndianNationalCalendar | Indian National Calendar, not the Lunar Calendar. |
JalaliCalendar | Jalali Calendar, aka Persian or Iranian, also used in Afghanistan. |
JapaneseCalendar | Japanese Calendar, Gregorian calculation using Japanese Era (Nengô) |
JulianCalendar | Julian Calendar, as used in Orthodox Churches. |
MinguoCalendar | Minguo Calendar, aka ROC, Republic of China or Taiwanese. |
ThaiCalendar | Thai Calendar, aka Buddhist or Thai Buddhist. |
QDateCalendar |
|
◆ DateFormat
enum KLocale::DateFormat |
Format for date string.
◆ DateTimeComponent
- Since
- 4.6
The various Components that make up a Date / Time In the future the Components may be combined as flags for dynamic generation of Date Formats.
◆ DateTimeComponentFormat
- Since
- 4.6
Format used for individual Date/Time Components when converted to/from a string Largely equivalent to the UNICODE CLDR format width definitions 1..5
- See also
- DateTimeComponentFormat
◆ DateTimeFormatOption
◆ DateTimeFormatStandard
◆ DateTimeParseMode
◆ DigitSet
enum KLocale::DigitSet |
- Since
- 4.3
The set of digit characters used to display and enter numbers.
◆ MeasureSystem
◆ ReadDateFlags
Flags for readDate()
◆ ReadTimeFlags
Flags for the old version of readTime()
- Deprecated:
- replaced by TimeFormatOptions
Enumerator | |
---|---|
WithSeconds | Only accept a time string with seconds. Default (no flag set) |
WithoutSeconds | Only accept a time string without seconds. |
◆ SignPosition
Various positions for where to place the positive or negative sign when they are related to a monetary value.
◆ TimeFormatOption
- Since
- 4.4
Format flags for readLocaleTime() and formatLocaleTime()
◆ TimeProcessingOption
Additional processing options for readLocaleTime().
- Remarks
- This is currently used as an enum but declared as a flag to be extensible
◆ WeekNumberSystem
- Since
- 4.6
System used for Week Numbers
Constructor & Destructor Documentation
◆ KLocale() [1/3]
|
explicit |
Constructs a KLocale.
The constructor looks for entries Language and Country in the group Locale in the configuration file.
If no configuration file is specified, it will also look for languages and country using the environment variables (KDE_LANG, LC_MESSAGES, LC_ALL, LANG), as well as the global configuration file.
If you specify a configuration file, it has to be valid until the KLocale object is destroyed. Note that a setLocale() will be performed on the config using the current locale language and country, which may cause a sync() and reparseConfiguration() which will save any changes you have made and load any changes other shared copies have made.
- Parameters
-
config a configuration file with a Locale group detailing locale-related preferences (such as language, country, and formatting options).
Definition at line 42 of file klocale.cpp.
◆ KLocale() [2/3]
KLocale::KLocale | ( | const QString & | language, |
const QString & | country = QString() , |
||
KConfig * | config = nullptr |
||
) |
Constructs a KLocale.
Allows you to override the language and, optionally, the country of this locale.
If you specify a configuration file, a setLocale() will be performed on the config using the current locale language and country, which may cause a sync() and reparseConfiguration() which will save any changes you have made.
- Parameters
-
language the ISO Language Code for the locale, e.g. "en" for English country the ISO Country Code for the locale, e.g. "US" for USA config a configuration file with a Locale group detailing locale-related preferences (such as language, country, and formatting options).
Definition at line 53 of file klocale.cpp.
◆ KLocale() [3/3]
KLocale::KLocale | ( | const KLocale & | rhs | ) |
Copy constructor.
Definition at line 646 of file klocale.cpp.
◆ ~KLocale()
|
virtual |
Destructor.
Definition at line 64 of file klocale.cpp.
Member Function Documentation
◆ allCountriesList()
QStringList KLocale::allCountriesList | ( | ) | const |
Provides list of all known country codes.
Use countryCodeToName(country) to get human readable, localized country names.
- Returns
- a list of all country codes
- See also
- countryCodeToName
Definition at line 596 of file klocale.cpp.
◆ allDigitSetsList()
QList< KLocale::DigitSet > KLocale::allDigitSetsList | ( | ) | const |
- Since
- 4.3
Provides list of all known digit set identifiers.
- Returns
- list of all digit set identifiers
- See also
- DigitSet
- digitSetToName
Definition at line 125 of file klocale.cpp.
◆ allLanguagesList()
QStringList KLocale::allLanguagesList | ( | ) | const |
Provides list of all known language codes.
Use languageCodeToName(language) to get human readable, localized language names.
- Returns
- list of all language codes
- See also
- languageCodeToName
- installedLanguages
Definition at line 581 of file klocale.cpp.
◆ binaryUnitDialect()
KLocale::BinaryUnitDialect KLocale::binaryUnitDialect | ( | ) | const |
Returns the user's configured binary unit dialect.
e.g. if MetricBinaryDialect is returned then the values configured for how much a set of bytes are worth would be 10^(3*n) and KB (1000 bytes == 1 KB), in this case.
Will never return DefaultBinaryDialect.
- Since
- 4.4
- Returns
- User's configured binary unit dialect
- See also
- BinaryUnitDialect
Definition at line 271 of file klocale.cpp.
◆ calendar()
const KCalendarSystem * KLocale::calendar | ( | ) | const |
Returns a pointer to the calendar system object.
- Returns
- the current calendar system instance
Definition at line 626 of file klocale.cpp.
◆ calendarSystem()
KLocale::CalendarSystem KLocale::calendarSystem | ( | ) | const |
- Since
- 4.6
Returns the type of Calendar System used in this Locale
- Returns
- the type of Calendar System
Definition at line 621 of file klocale.cpp.
◆ calendarType()
QString KLocale::calendarType | ( | ) | const |
- Deprecated:
- use calendarSystem() instead
Returns the name of the calendar system that is currently being used by the system.
- See also
- calendarSystem()
- Returns
- the name of the calendar system
Definition at line 616 of file klocale.cpp.
◆ codecForEncoding()
QTextCodec * KLocale::codecForEncoding | ( | ) | const |
Returns the user's preferred encoding.
Should never be NULL.
- Returns
- The codec for the preferred encoding
- See also
- encoding
- encodingMib
Definition at line 571 of file klocale.cpp.
◆ convertDigits()
QString KLocale::convertDigits | ( | const QString & | str, |
DigitSet | digitSet, | ||
bool | ignoreContext = false |
||
) | const |
- Since
- 4.3
Convert all digits in the string to the given digit set.
Conversion is normally not performed if the given digit set is not appropriate in the current locale and language context. Unconditional conversion may be requested by setting ignoreContext
to true
.
- Parameters
-
str the string to convert digitSet the digit set identifier ignoreContext unconditional conversion if true
- Returns
- string with converted digits
- See also
- DigitSet
Definition at line 135 of file klocale.cpp.
◆ country()
QString KLocale::country | ( | ) | const |
Returns the country code of the country where the user lives.
The returned code complies with the ISO 3166-1 alpha-2 standard, except by KDE convention it is returned in lowercase whereas the official standard is uppercase. See http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 for details.
defaultCountry() is returned by default, if no other available, this will always be uppercase 'C'.
Use countryCodeToName(country) to get human readable, localized country names.
- Returns
- the country code for the user
- See also
- countryCodeToName
Definition at line 105 of file klocale.cpp.
◆ countryCodeToName()
Convert a known country code to a human readable, localized form.
If an unknown country code is supplied, empty string is returned; this will never happen if the code has been obtained by one of the KLocale methods.
- Parameters
-
country the country code
- Returns
- the human readable and localized form of the country name
- See also
- country
- allCountriesList
Definition at line 601 of file klocale.cpp.
◆ countryDivisionCode()
QString KLocale::countryDivisionCode | ( | ) | const |
- Since
- 4.6
Returns the Country Division Code of the Country where the user lives. When no value is set, then the Country Code will be returned.
The returned code complies with the ISO 3166-2 standard. See http://en.wikipedia.org/wiki/ISO_3166-2 for details.
Note that unlike country() this method will return the correct case, i.e. normally uppercase..
In KDE 4.6 it is the apps responsibility to obtain a translation for the code, translation and other services will be priovided in KDE 4.7.
- Returns
- the Country Division Code for the user
- See also
- setCountryDivisionCode
Definition at line 110 of file klocale.cpp.
◆ currency()
KCurrencyCode * KLocale::currency | ( | ) | const |
- Since
- 4.4
Returns the Currency Code object for the current locale
- Returns
- The default Currency Code object used by locale.
Definition at line 115 of file klocale.cpp.
◆ currencyCode()
QString KLocale::currencyCode | ( | ) | const |
- Since
- 4.4
Returns the ISO 4217 Currency Code for the current locale
- Returns
- The default ISO Currency Code used by locale.
Definition at line 120 of file klocale.cpp.
◆ currencyCodeList()
QStringList KLocale::currencyCodeList | ( | ) | const |
- Since
- 4.4
Returns the ISO Currency Codes used in the locale, ordered by decreasing priority.
Use KCurrency::currencyCodeToName(currencyCode) to get human readable, localized language name.
- Returns
- list of ISO Currency Codes
- See also
- currencyCodeToName
Definition at line 381 of file klocale.cpp.
◆ currencySymbol()
QString KLocale::currencySymbol | ( | ) | const |
Returns what the symbol denoting currency in the current locale as as defined by user settings should look like.
- Returns
- The default currency symbol used by locale.
Definition at line 185 of file klocale.cpp.
◆ dateFormat()
QString KLocale::dateFormat | ( | ) | const |
Returns the currently selected date format.
- Returns
- Current date format.
- See also
- setDateFormat()
Definition at line 436 of file klocale.cpp.
◆ dateFormatShort()
QString KLocale::dateFormatShort | ( | ) | const |
Returns the currently selected short date format.
- Returns
- Current short date format.
- See also
- setDateFormatShort()
Definition at line 441 of file klocale.cpp.
◆ dateMonthNamePossessive()
bool KLocale::dateMonthNamePossessive | ( | ) | const |
Use this to determine whether in dates a possessive form of month name is preferred ("of January" rather than "January")
- Returns
- If possessive form should be used
Definition at line 145 of file klocale.cpp.
◆ dateTimeDigitSet()
KLocale::DigitSet KLocale::dateTimeDigitSet | ( | ) | const |
- Since
- 4.3
Returns the identifier of the digit set used to display dates and time.
- Returns
- the digit set identifier
- See also
- DigitSet
- digitSetToName
Definition at line 685 of file klocale.cpp.
◆ dayPeriodText()
QString KLocale::dayPeriodText | ( | const QTime & | time, |
DateTimeComponentFormat | format = DefaultComponentFormat |
||
) | const |
- Since
- 4.6
Returns the Day Period matching the time given
- Parameters
-
time the time to return the day period for format the format to return teh day period in
- Returns
- the Day Period for the given time
Definition at line 371 of file klocale.cpp.
◆ decimalPlaces()
int KLocale::decimalPlaces | ( | ) | const |
- Since
- 4.4
The number of decimal places to include in numeric values (usually 2).
- Returns
- Default number of numeric decimal places used by locale.
Definition at line 170 of file klocale.cpp.
◆ decimalSymbol()
QString KLocale::decimalSymbol | ( | ) | const |
Returns what a decimal point should look like ("." or "," etc.) according to the current locale or user settings.
- Returns
- The decimal symbol used by locale.
Definition at line 175 of file klocale.cpp.
◆ defaultCountry()
|
static |
Returns the code of the default country, i.e.
"C"
This function will not provide a sensible value to use in your app, please use country() instead.
- See also
- country
- Returns
- Name of the default country
Definition at line 546 of file klocale.cpp.
◆ defaultCurrencyCode()
|
static |
- Since
- 4.4
Returns the ISO Code of the default currency.
- Returns
- ISO Currency Code of the default currency
Definition at line 551 of file klocale.cpp.
◆ defaultLanguage()
|
static |
Returns the name of the internal language.
- Returns
- Name of the default language
Definition at line 541 of file klocale.cpp.
◆ digitSet()
KLocale::DigitSet KLocale::digitSet | ( | ) | const |
- Since
- 4.3
Returns the identifier of the digit set used to display numbers.
- Returns
- the digit set identifier
- See also
- DigitSet
- digitSetToName
Definition at line 665 of file klocale.cpp.
◆ digitSetToName()
QString KLocale::digitSetToName | ( | KLocale::DigitSet | digitSet, |
bool | withDigits = false |
||
) | const |
- Since
- 4.3
Convert a digit set identifier to a human readable, localized name.
- Parameters
-
digitSet the digit set identifier withDigits whether to add the digits themselves to the name
- Returns
- the human readable and localized name of the digit set
- See also
- DigitSet
Definition at line 130 of file klocale.cpp.
◆ encoding()
const QByteArray KLocale::encoding | ( | ) | const |
Returns the user's preferred encoding.
- Returns
- The name of the preferred encoding
- See also
- codecForEncoding
- encodingMib
Definition at line 556 of file klocale.cpp.
◆ encodingMib()
int KLocale::encodingMib | ( | ) | const |
Returns the user's preferred encoding.
- Returns
- The Mib of the preferred encoding
- See also
- encoding
- codecForEncoding
Definition at line 561 of file klocale.cpp.
◆ fileEncodingMib()
int KLocale::fileEncodingMib | ( | ) | const |
Returns the file encoding.
- Returns
- The Mib of the file encoding
- See also
- QFile::encodeName
- QFile::decodeName
Definition at line 566 of file klocale.cpp.
◆ formatByteSize() [1/2]
QString KLocale::formatByteSize | ( | double | size | ) | const |
Converts size
from bytes to the string representation using the user's default binary unit dialect.
The default unit dialect is IEC 60027-2.
Example: formatByteSize(1024) returns "1.0 KiB" by default.
- Parameters
-
size size in bytes
- Returns
- converted size as a string - e.g. 123.4 KiB , 12.0 MiB
- See also
- BinaryUnitDialect
Definition at line 266 of file klocale.cpp.
◆ formatByteSize() [2/2]
QString KLocale::formatByteSize | ( | double | size, |
int | precision, | ||
KLocale::BinaryUnitDialect | dialect = KLocale::DefaultBinaryDialect , |
||
KLocale::BinarySizeUnits | specificUnit = KLocale::DefaultBinaryUnits |
||
) | const |
- Since
- 4.4
Converts size
from bytes to the appropriate string representation using the binary unit dialect dialect
and the specific units specificUnit
.
Example: formatByteSize(1000, unit, KLocale::UnitKiloByte) returns: for KLocale::MetricBinaryDialect, "1.0 kB", for KLocale::IECBinaryDialect, "0.9 KiB", for KLocale::JEDECBinaryDialect, "0.9 KB".
- Parameters
-
size size in bytes precision number of places after the decimal point to use. KDE uses 1 by default so when in doubt use 1. dialect binary unit standard to use. Use DefaultBinaryDialect to use the localized user selection unless you need to use a specific unit type (such as displaying a flash memory size in JEDEC). specificUnit specific unit size to use in result. Use DefaultBinaryUnits to automatically select a unit that will return a sanely-sized number.
- Returns
- converted size as a translated string including the units. E.g. "1.23 KiB", "2 GB" (JEDEC), "4.2 kB" (Metric).
- See also
- BinaryUnitDialect
Definition at line 260 of file klocale.cpp.
◆ formatDate()
QString KLocale::formatDate | ( | const QDate & | date, |
KLocale::DateFormat | format = LongDate |
||
) | const |
Returns a string formatted to the current locale's conventions regarding dates.
- Parameters
-
date the date to be formatted format category of date format to use
- Returns
- the date as a string
Definition at line 291 of file klocale.cpp.
◆ formatDateTime() [1/2]
QString KLocale::formatDateTime | ( | const KDateTime & | dateTime, |
KLocale::DateFormat | format = ShortDate , |
||
DateTimeFormatOptions | options = {} |
||
) | const |
Returns a string formatted to the current locale's conventions regarding both date and time.
- Parameters
-
dateTime the date and time to be formatted format category of date format to use options additional output options
- Returns
- The date and time as a string
Definition at line 391 of file klocale.cpp.
◆ formatDateTime() [2/2]
QString KLocale::formatDateTime | ( | const QDateTime & | dateTime, |
KLocale::DateFormat | format = ShortDate , |
||
bool | includeSecs = false |
||
) | const |
Returns a string formatted to the current locale's conventions regarding both date and time.
- Parameters
-
dateTime the date and time to be formatted format category of date format to use includeSecs if true
, the string will include the seconds part of the time; otherwise, the seconds will be omitted
- Returns
- the date and time as a string
Definition at line 386 of file klocale.cpp.
◆ formatDuration()
QString KLocale::formatDuration | ( | unsigned long | mSec | ) | const |
Given a number of milliseconds, converts that to a string containing the localized equivalent.
e.g. given formatDuration(60000), returns "1.0 minutes"
- Parameters
-
mSec Time duration in milliseconds
- Returns
- converted duration as a string - e.g. "5.5 seconds" "23.0 minutes"
Definition at line 281 of file klocale.cpp.
◆ formatLocaleTime()
QString KLocale::formatLocaleTime | ( | const QTime & | pTime, |
TimeFormatOptions | options = KLocale::TimeDefault |
||
) | const |
- Since
- 4.4
Returns a string formatted to the current locale's conventions regarding times.
- Parameters
-
pTime the time to be formatted options format option to use when formatting the time
- Returns
- The time as a string
Definition at line 361 of file klocale.cpp.
◆ formatLong()
QString KLocale::formatLong | ( | long | num | ) | const |
Given an integer, converts that to a numeric string containing the localized numeric equivalent.
e.g. given 123456L, return "123,456" (for some European country).
- Parameters
-
num The number to convert
- Returns
- The number as a localized string
Definition at line 250 of file klocale.cpp.
◆ formatMoney()
QString KLocale::formatMoney | ( | double | num, |
const QString & | currency = QString() , |
||
int | precision = -1 |
||
) | const |
Given a double, converts that to a numeric string containing the localized monetary equivalent.
e.g. given 123456, return "$ 123,456.00".
If precision isn't specified or is < 0, then the default monetaryDecimalPlaces() is used.
- Parameters
-
num The number we want to format currency The currency symbol you want. precision Number of decimal places displayed
- Returns
- The number of money as a localized string
- See also
- monetaryDecimalPlaces()
Definition at line 240 of file klocale.cpp.
◆ formatNumber() [1/2]
QString KLocale::formatNumber | ( | const QString & | numStr, |
bool | round = true , |
||
int | precision = -1 |
||
) | const |
Given a string representing a number, converts that to a numeric string containing the localized numeric equivalent.
e.g. given 123456.78F, return "123,456.78" (for some European country).
If precision isn't specified or is < 0, then the default decimalPlaces() is used.
- Parameters
-
numStr The number to format, as a string. round Round fractional digits. (default true) precision Number of fractional digits used for rounding. Unused if round=false.
- Returns
- The number as a localized string
Definition at line 255 of file klocale.cpp.
◆ formatNumber() [2/2]
QString KLocale::formatNumber | ( | double | num, |
int | precision = -1 |
||
) | const |
Given a double, converts that to a numeric string containing the localized numeric equivalent.
e.g. given 123456.78F, return "123,456.78" (for some European country).
If precision isn't specified or is < 0, then the default decimalPlaces() is used.
This function is a wrapper that is provided for convenience.
- Parameters
-
num The number to convert precision Number of decimal places used.
- Returns
- The number as a localized string
- See also
- formatNumber(const QString, bool, int)
- decimalPlaces()
Definition at line 245 of file klocale.cpp.
◆ formatTime()
QString KLocale::formatTime | ( | const QTime & | pTime, |
bool | includeSecs = false , |
||
bool | isDuration = false |
||
) | const |
- Deprecated:
- replaced by formatLocaleTime()
Returns a string formatted to the current locale's conventions regarding times.
- Parameters
-
pTime The time to be formatted. includeSecs if true, seconds are included in the output, otherwise only hours and minutes are formatted. isDuration if true, the given time is a duration, not a clock time. This means "am/pm" shouldn't be displayed.
- Returns
- The time as a string
Definition at line 356 of file klocale.cpp.
◆ fracDigits()
int KLocale::fracDigits | ( | ) | const |
The number of fractional digits to include in monetary values (usually 2).
- Returns
- Default number of fractional digits used by locale.
Definition at line 210 of file klocale.cpp.
◆ global()
|
static |
Return the global KLocale instance.
This is the one used by default by all i18n calls.
Note: in multi-threaded programs, you should call KLocale::global() in the main thread (e.g. in main(), after creating the QCoreApplication and setting the main component), to ensure that the initialization is done in the main thread. However KApplication takes care of this, so this is only needed when not using KApplication.
- Since
- 5.0
Definition at line 309 of file klocale.cpp.
◆ installedLanguages()
QStringList KLocale::installedLanguages | ( | ) | const |
- Since
- 4.6
Provides list of all installed KDE Language Translations.
Use languageCodeToName(language) to get human readable, localized language names.
- Returns
- list of all installed language codes
- See also
- languageCodeToName
Definition at line 586 of file klocale.cpp.
◆ language()
QString KLocale::language | ( | ) | const |
Returns the language code used by this object.
Use languageCodeToName(language) to get human readable, localized language name.
- Returns
- the currently used language code
- See also
- languageCodeToName
Definition at line 100 of file klocale.cpp.
◆ languageCodeToName()
Convert a known language code to a human readable, localized form.
If an unknown language code is supplied, empty string is returned; this will never happen if the code has been obtained by one of the KLocale methods.
- Parameters
-
language the language code
- Returns
- the human readable and localized form if the code is known, empty otherwise
Definition at line 591 of file klocale.cpp.
◆ languageList()
QStringList KLocale::languageList | ( | ) | const |
Returns the language codes selected by user, ordered by decreasing priority.
Use languageCodeToName(language) to get human readable, localized language name.
- Returns
- list of language codes
- See also
- languageCodeToName
Definition at line 376 of file klocale.cpp.
◆ measureSystem()
KLocale::MeasureSystem KLocale::measureSystem | ( | ) | const |
Returns which measuring system we use.
- Returns
- The preferred measuring system
Definition at line 531 of file klocale.cpp.
◆ monetaryDecimalPlaces()
int KLocale::monetaryDecimalPlaces | ( | ) | const |
- Since
- 4.4
The number of decimal places to include in monetary values (usually 2).
- Returns
- Default number of monetary decimal places used by locale.
Definition at line 215 of file klocale.cpp.
◆ monetaryDecimalSymbol()
QString KLocale::monetaryDecimalSymbol | ( | ) | const |
Returns what a decimal point should look like ("." or "," etc.) for monetary values, according to the current locale or user settings.
- Returns
- The monetary decimal symbol used by locale.
Definition at line 190 of file klocale.cpp.
◆ monetaryDigitSet()
KLocale::DigitSet KLocale::monetaryDigitSet | ( | ) | const |
- Since
- 4.3
Retuns the digit set used to display monetary values.
- Returns
- the digit set identifier
- See also
- DigitSet
- digitSetToName
Definition at line 675 of file klocale.cpp.
◆ monetaryThousandsSeparator()
QString KLocale::monetaryThousandsSeparator | ( | ) | const |
Returns what a thousands separator for monetary values should look like ("," or " " etc.) according to the current locale or user settings.
- Returns
- The monetary thousands separator used by locale.
Definition at line 195 of file klocale.cpp.
◆ negativeMonetarySignPosition()
KLocale::SignPosition KLocale::negativeMonetarySignPosition | ( | ) | const |
Denotes where to place a negative sign in relation to a monetary value.
- Returns
- Where/how to print the negative sign.
- See also
- SignPosition
Definition at line 235 of file klocale.cpp.
◆ negativePrefixCurrencySymbol()
bool KLocale::negativePrefixCurrencySymbol | ( | ) | const |
If and only if the currency symbol precedes a negative value, this will be true.
- Returns
- True if the currency symbol precedes negative numbers.
Definition at line 225 of file klocale.cpp.
◆ negativeSign()
QString KLocale::negativeSign | ( | ) | const |
Returns what a negative sign should look like ("-", etc.) according to the current locale or user settings.
- Returns
- The negative sign used by locale.
Definition at line 205 of file klocale.cpp.
◆ nounDeclension()
bool KLocale::nounDeclension | ( | ) | const |
Use this to determine whether nouns are declined in locale's language. This property should remain read-only (no setter function)
- Returns
- If nouns are declined
Definition at line 140 of file klocale.cpp.
◆ operator=()
Assignment operator.
Definition at line 652 of file klocale.cpp.
◆ pageSize()
int KLocale::pageSize | ( | ) | const |
Returns the preferred page size for printing.
- Returns
- The preferred page size, cast it to QPrinter::PaperSize
Definition at line 521 of file klocale.cpp.
◆ positiveMonetarySignPosition()
KLocale::SignPosition KLocale::positiveMonetarySignPosition | ( | ) | const |
Returns the position of a positive sign in relation to a monetary value.
- Returns
- Where/how to print the positive sign.
- See also
- SignPosition
Definition at line 230 of file klocale.cpp.
◆ positivePrefixCurrencySymbol()
bool KLocale::positivePrefixCurrencySymbol | ( | ) | const |
If and only if the currency symbol precedes a positive value, this will be true.
- Returns
- Where to print the currency symbol for positive numbers.
Definition at line 220 of file klocale.cpp.
◆ positiveSign()
QString KLocale::positiveSign | ( | ) | const |
Returns what a positive sign should look like ("+", " ", etc.) according to the current locale or user settings.
- Returns
- The positive sign used by locale.
Definition at line 200 of file klocale.cpp.
◆ prettyFormatDuration()
QString KLocale::prettyFormatDuration | ( | unsigned long | mSec | ) | const |
Given a number of milliseconds, converts that to a pretty string containing the localized equivalent.
e.g. given prettyFormatDuration(60001) returns "1 minute" given prettyFormatDuration(62005) returns "1 minute and 2 seconds" given prettyFormatDuration(90060000) returns "1 day and 1 hour"
- Parameters
-
mSec Time duration in milliseconds
- Returns
- converted duration as a string. Units not interesting to the user, for example seconds or minutes when the first unit is day, are not returned because they are irrelevant. The same applies for seconds when the first unit is hour.
- Since
- 4.2
Definition at line 286 of file klocale.cpp.
◆ readDate() [1/3]
Converts a localized date string to a QDate, using the specified format.
You will usually not want to use this method.
- See also
- KCalendarSystem::readDate()
Definition at line 335 of file klocale.cpp.
◆ readDate() [2/3]
Converts a localized date string to a QDate.
This method will try all ReadDateFlag formats in preferred order to read a valid date.
The bool pointed by ok will be invalid if the date entered was not valid.
- Parameters
-
str the string we want to convert. ok the boolean that is set to false if it's not a valid date. If ok
is 0, it will be ignored
- Returns
- The string converted to a QDate
- See also
- KCalendarSystem::readDate()
Definition at line 325 of file klocale.cpp.
◆ readDate() [3/3]
QDate KLocale::readDate | ( | const QString & | str, |
ReadDateFlags | flags, | ||
bool * | ok = nullptr |
||
) | const |
Converts a localized date string to a QDate.
This method is stricter than readDate(str,&ok): it will only accept a date in a specific format, depending on flags
.
- Parameters
-
str the string we want to convert. flags what format the the date string will be in ok the boolean that is set to false if it's not a valid date. If ok
is 0, it will be ignored
- Returns
- The string converted to a QDate
- See also
- KCalendarSystem::readDate()
Definition at line 330 of file klocale.cpp.
◆ readLocaleTime()
QTime KLocale::readLocaleTime | ( | const QString & | str, |
bool * | ok = nullptr , |
||
TimeFormatOptions | options = KLocale::TimeDefault , |
||
TimeProcessingOptions | processing = ProcessNonStrict |
||
) | const |
- Since
- 4.4
Converts a localized time string to a QTime. This method is stricter than readTime(str, &ok) in that it will either accept a time with seconds or a time without seconds.
- Parameters
-
str the string we want to convert ok the boolean that is set to false if it's not a valid time. If ok
is 0, it will be ignored.options format option to apply when formatting the time processing if set to ProcessStrict
, checking will be strict and the read time string has to have the exact time format specified. If set toProcessNonStrict
processing the time is lax and spaces in the time string can be left out.
- Returns
- The string converted to a QTime
Definition at line 350 of file klocale.cpp.
◆ readMoney()
double KLocale::readMoney | ( | const QString & | numStr, |
bool * | ok = nullptr |
||
) | const |
Converts a localized monetary string to a double.
- Parameters
-
numStr the string we want to convert. ok the boolean that is set to false if it's not a number. If ok
is 0, it will be ignored
- Returns
- The string converted to a double
Definition at line 320 of file klocale.cpp.
◆ readNumber()
double KLocale::readNumber | ( | const QString & | numStr, |
bool * | ok = nullptr |
||
) | const |
Converts a localized numeric string to a double.
- Parameters
-
numStr the string we want to convert. ok the boolean that is set to false if it's not a number. If ok
is 0, it will be ignored
- Returns
- The string converted to a double
Definition at line 315 of file klocale.cpp.
◆ readTime() [1/2]
Converts a localized time string to a QTime.
This method will try to parse it with seconds, then without seconds. The bool pointed to by ok
will be set to false if the time entered was not valid.
- Parameters
-
str the string we want to convert. ok the boolean that is set to false if it's not a valid time. If ok
is 0, it will be ignored
- Returns
- The string converted to a QTime
Definition at line 340 of file klocale.cpp.
◆ readTime() [2/2]
QTime KLocale::readTime | ( | const QString & | str, |
KLocale::ReadTimeFlags | flags, | ||
bool * | ok = nullptr |
||
) | const |
- Deprecated:
- replaced readLocaleTime()
Converts a localized time string to a QTime. This method is stricter than readTime(str,&ok): it will either accept a time with seconds or a time without seconds. Use this method when the format is known by the application.
- Parameters
-
str the string we want to convert. flags whether the time string is expected to contain seconds or not. ok the boolean that is set to false if it's not a valid time. If ok
is 0, it will be ignored
- Returns
- The string converted to a QTime
Definition at line 345 of file klocale.cpp.
◆ reparseConfiguration()
void KLocale::reparseConfiguration | ( | ) |
- Since
- 4.8
Reparse locale configuration files for the current selected language.
Definition at line 690 of file klocale.cpp.
◆ setBinaryUnitDialect()
void KLocale::setBinaryUnitDialect | ( | KLocale::BinaryUnitDialect | newDialect | ) |
Sets newDialect
to be the default dialect for this locale (and only this locale).
Newly created KLocale objects will continue to default to the user's choice.
- Parameters
-
newDialect the new dialect to set as default for this locale object.
- Since
- 4.4
Definition at line 276 of file klocale.cpp.
◆ setCalendar()
void KLocale::setCalendar | ( | const QString & | calendarType | ) |
- Deprecated:
- use setCalendarSystem() instead
Changes the current calendar system to the calendar specified. If the calendar system specified is not found, gregorian will be used.
- See also
- setCalendarSystem()
- Parameters
-
calendarType the name of the calendar type
Definition at line 606 of file klocale.cpp.
◆ setCalendarSystem()
void KLocale::setCalendarSystem | ( | KLocale::CalendarSystem | calendarSystem | ) |
- Since
- 4.6
Sets the type of Calendar System to use in this Locale
- Parameters
-
calendarSystem the Calendar System to use
Definition at line 611 of file klocale.cpp.
◆ setCountry()
Changes the current country.
The current country will be left unchanged if failed. It will force a reload of the country specific configuration.
An empty country value will set the country to the system default.
If you specify a configuration file, a setLocale() will be performed on the config using the current locale language, which may cause a sync() and reparseConfiguration() which will save any changes you have made.
- Parameters
-
country the ISO 3166 country code config a configuration file with a Locale group detailing locale-related preferences (such as language, contry, and formatting options).
- Returns
true
on success,false
on failure
Definition at line 69 of file klocale.cpp.
◆ setCountryDivisionCode()
bool KLocale::setCountryDivisionCode | ( | const QString & | countryDivision | ) |
- Since
- 4.6
Sets the Country Division Code of the Country where the user lives.
The code must comply with the ISO 3166-2 standard. See http://en.wikipedia.org/wiki/ISO_3166-2 for details.
In KDE 4.6 it is the apps responsibility to validate the input, full validation and other services will be provided in KDE 4.7.
- Parameters
-
countryDivision the Country Division Code for the user
- Returns
true
on success,false
on failure
- See also
- countryDivisionCode
Definition at line 74 of file klocale.cpp.
◆ setCurrencyCode()
void KLocale::setCurrencyCode | ( | const QString & | newCurrencyCode | ) |
- Since
- 4.4
Changes the current ISO Currency Code.
- Parameters
-
newCurrencyCode The new Currency Code
Definition at line 89 of file klocale.cpp.
◆ setCurrencySymbol()
void KLocale::setCurrencySymbol | ( | const QString & | symbol | ) |
Changes the current currency symbol.
This symbol should be consistant with the selected Currency Code
- Parameters
-
symbol The new currency symbol
- See also
- currencyCode, KCurrency::currencySymbols
Definition at line 516 of file klocale.cpp.
◆ setDateFormat()
void KLocale::setDateFormat | ( | const QString & | format | ) |
Changes the current date format.
The format of the date is a string which contains variables that will be replaced:
- Y with the whole year (e.g. "2004" for "2004")
- y with the lower 2 digits of the year (e.g. "04" for "2004")
- n with the month (January="1", December="12")
- m with the month with two digits (January="01", December="12")
- e with the day of the month (e.g. "1" on the first of march)
- d with the day of the month with two digits (e.g. "01" on the first of march)
- b with the short form of the month (e.g. "Jan" for January)
- B with the long form of the month (e.g. "January")
- a with the short form of the weekday (e.g. "Wed" for Wednesday)
- A with the long form of the weekday (e.g. "Wednesday" for Wednesday)
Everything else in the format string will be taken as is. For example, March 20th 1989 with the format "%y:%m:%d" results in "89:03:20".
- Parameters
-
format The new date format
Definition at line 396 of file klocale.cpp.
◆ setDateFormatShort()
void KLocale::setDateFormatShort | ( | const QString & | format | ) |
Changes the current short date format.
The format of the date is a string which contains variables that will be replaced:
- Y with the whole year (e.g. "1984" for "1984")
- y with the lower 2 digits of the year (e.g. "84" for "1984")
- n with the month (January="1", December="12")
- m with the month with two digits (January="01", December="12")
- e with the day of the month (e.g. "1" on the first of march)
- d with the day of the month with two digits(e.g. "01" on the first of march)
- b with the short form of the month (e.g. "Jan" for January)
- B with the long form of the month (e.g. "January")
- a with the short form of the weekday (e.g. "Wed" for Wednesday)
- A with the long form of the weekday (e.g. "Wednesday" for Wednesday)
Everything else in the format string will be taken as is. For example, March 20th 1989 with the format "%y:%m:%d" results in "89:03:20".
- Parameters
-
format The new short date format
Definition at line 401 of file klocale.cpp.
◆ setDateMonthNamePossessive()
void KLocale::setDateMonthNamePossessive | ( | bool | possessive | ) |
Changes the form of month name used in dates.
- Parameters
-
possessive True if possessive forms should be used
Definition at line 406 of file klocale.cpp.
◆ setDateTimeDigitSet()
void KLocale::setDateTimeDigitSet | ( | KLocale::DigitSet | digitSet | ) |
- Since
- 4.3
Set digit characters used to display dates and time.
- Parameters
-
digitSet the digit set identifier
- See also
- DigitSet
Definition at line 680 of file klocale.cpp.
◆ setDecimalPlaces()
void KLocale::setDecimalPlaces | ( | int | digits | ) |
- Since
- 4.4
Changes the number of decimal places used when formating numbers.
- Parameters
-
digits The default number of digits to use.
Definition at line 451 of file klocale.cpp.
◆ setDecimalSymbol()
void KLocale::setDecimalSymbol | ( | const QString & | symbol | ) |
Changes the symbol used to identify the decimal pointer.
- Parameters
-
symbol The new decimal symbol.
Definition at line 456 of file klocale.cpp.
◆ setDigitSet()
void KLocale::setDigitSet | ( | KLocale::DigitSet | digitSet | ) |
- Since
- 4.3
Changes the set of digit characters used to display numbers.
- Parameters
-
digitSet the digit set identifier
- See also
- DigitSet
Definition at line 660 of file klocale.cpp.
◆ setEncoding()
bool KLocale::setEncoding | ( | int | mibEnum | ) |
Changes the current encoding.
- Parameters
-
mibEnum The mib of the preferred codec
- Returns
- True on success.
Definition at line 576 of file klocale.cpp.
◆ setFracDigits()
void KLocale::setFracDigits | ( | int | digits | ) |
Changes the number of digits used when formating numbers.
- Parameters
-
digits The default number of digits to use.
Definition at line 496 of file klocale.cpp.
◆ setLanguage() [1/2]
Changes the current language.
The current language will be left unchanged if failed. It will force a reload of the country specific configuration as well.
If you specify a configuration file, a setLocale() will be performed on the config using the current locale language, which may cause a sync() and reparseConfiguration() which will save any changes you have made.
- Parameters
-
language the language code config a configuration file with a Locale group detailing locale-related preferences (such as language, country, and formatting options).
- Returns
- true on success
Definition at line 79 of file klocale.cpp.
◆ setLanguage() [2/2]
bool KLocale::setLanguage | ( | const QStringList & | languages | ) |
Changes the list of preferred languages for the locale.
The first valid language in the list will be used, or the default language (en_US) if none of the specified languages were available.
- Parameters
-
languages the list of language codes
- Returns
- true if one of the specified languages were used
Definition at line 84 of file klocale.cpp.
◆ setMeasureSystem()
void KLocale::setMeasureSystem | ( | KLocale::MeasureSystem | value | ) |
Changes the preferred measuring system.
- Returns
- value The preferred measuring system
Definition at line 536 of file klocale.cpp.
◆ setMonetaryDecimalPlaces()
void KLocale::setMonetaryDecimalPlaces | ( | int | digits | ) |
- Since
- 4.4
Changes the number of decimal places used when formating money.
- Parameters
-
digits The default number of digits to use.
Definition at line 501 of file klocale.cpp.
◆ setMonetaryDecimalSymbol()
void KLocale::setMonetaryDecimalSymbol | ( | const QString & | symbol | ) |
Changes the symbol used to identify the decimal pointer for monetary values.
- Parameters
-
symbol The new decimal symbol.
Definition at line 511 of file klocale.cpp.
◆ setMonetaryDigitSet()
void KLocale::setMonetaryDigitSet | ( | KLocale::DigitSet | digitSet | ) |
- Since
- 4.3
Set digit characters used to display monetary values.
- Parameters
-
digitSet the digit set identifier
- See also
- DigitSet
Definition at line 670 of file klocale.cpp.
◆ setMonetaryThousandsSeparator()
void KLocale::setMonetaryThousandsSeparator | ( | const QString & | separator | ) |
Changes the separator used to group digits when formating monetary values.
- Parameters
-
separator The new thousands separator.
Definition at line 506 of file klocale.cpp.
◆ setNegativeMonetarySignPosition()
void KLocale::setNegativeMonetarySignPosition | ( | KLocale::SignPosition | signpos | ) |
Changes the sign position used for negative monetary values.
- Parameters
-
signpos The new sign position
Definition at line 481 of file klocale.cpp.
◆ setNegativePrefixCurrencySymbol()
void KLocale::setNegativePrefixCurrencySymbol | ( | bool | prefix | ) |
Changes the position where the currency symbol should be printed for negative monetary values.
- Parameters
-
prefix True if the currency symbol should be prefixed instead of postfixed
Definition at line 491 of file klocale.cpp.
◆ setNegativeSign()
void KLocale::setNegativeSign | ( | const QString & | sign | ) |
Changes the sign used to identify a negative number.
- Parameters
-
sign Sign used for negative numbers.
Definition at line 471 of file klocale.cpp.
◆ setPageSize()
void KLocale::setPageSize | ( | int | paperFormat | ) |
Changes the preferred page size when printing.
- Parameters
-
paperFormat the new preferred page size in the format QPrinter::PaperSize
Definition at line 526 of file klocale.cpp.
◆ setPositiveMonetarySignPosition()
void KLocale::setPositiveMonetarySignPosition | ( | KLocale::SignPosition | signpos | ) |
Changes the sign position used for positive monetary values.
- Parameters
-
signpos The new sign position
Definition at line 476 of file klocale.cpp.
◆ setPositivePrefixCurrencySymbol()
void KLocale::setPositivePrefixCurrencySymbol | ( | bool | prefix | ) |
Changes the position where the currency symbol should be printed for positive monetary values.
- Parameters
-
prefix True if the currency symbol should be prefixed instead of postfixed
Definition at line 486 of file klocale.cpp.
◆ setPositiveSign()
void KLocale::setPositiveSign | ( | const QString & | sign | ) |
Changes the sign used to identify a positive number.
Normally this is left blank.
- Parameters
-
sign Sign used for positive numbers.
Definition at line 466 of file klocale.cpp.
◆ setThousandsSeparator()
void KLocale::setThousandsSeparator | ( | const QString & | separator | ) |
Changes the separator used to group digits when formating numbers.
- Parameters
-
separator The new thousands separator.
Definition at line 461 of file klocale.cpp.
◆ setTimeFormat()
void KLocale::setTimeFormat | ( | const QString & | format | ) |
Changes the current time format.
The format of the time is string a which contains variables that will be replaced:
- H with the hour in 24h format and 2 digits (e.g. 5pm is "17", 5am is "05")
- k with the hour in 24h format and one digits (e.g. 5pm is "17", 5am is "5")
- I with the hour in 12h format and 2 digits (e.g. 5pm is "05", 5am is "05")
- l with the hour in 12h format and one digits (e.g. 5pm is "5", 5am is "5")
- M with the minute with 2 digits (e.g. the minute of 07:02:09 is "02")
- S with the seconds with 2 digits (e.g. the minute of 07:02:09 is "09")
- p with pm or am (e.g. 17.00 is "pm", 05.00 is "am")
Everything else in the format string will be taken as is. For example, 5.23pm with the format "%H:%M" results in "17:23".
- Parameters
-
format The new time format
Definition at line 411 of file klocale.cpp.
◆ setWeekDayOfPray()
void KLocale::setWeekDayOfPray | ( | int | day | ) |
Changes how KLocale defines the day reserved for religious observance.
- Since
- 4.2
- Parameters
-
day day of the week for religious observance (None=0,Monday=1..Sunday=7) as integer
Definition at line 431 of file klocale.cpp.
◆ setWeekNumberSystem()
void KLocale::setWeekNumberSystem | ( | KLocale::WeekNumberSystem | weekNumberSystem | ) |
- Since
- 4.6
Sets the type of Week Number System to use in this Locale
- See also
- Klocale::WeekNumberSystem
- weekNumberSystem()
- Parameters
-
weekNumberSystem the Week Number System to use
Definition at line 631 of file klocale.cpp.
◆ setWeekStartDay()
void KLocale::setWeekStartDay | ( | int | day | ) |
Changes how KLocale defines the first day in week.
- Parameters
-
day first day of the week (Monday=1..Sunday=7) as integer
Definition at line 416 of file klocale.cpp.
◆ setWorkingWeekEndDay()
void KLocale::setWorkingWeekEndDay | ( | int | day | ) |
Changes how KLocale defines the last working day in week.
- Since
- 4.2
- Parameters
-
day last working day of the week (Monday=1..Sunday=7) as integer
Definition at line 426 of file klocale.cpp.
◆ setWorkingWeekStartDay()
void KLocale::setWorkingWeekStartDay | ( | int | day | ) |
Changes how KLocale defines the first working day in week.
- Since
- 4.2
- Parameters
-
day first working day of the week (Monday=1..Sunday=7) as integer
Definition at line 421 of file klocale.cpp.
◆ splitLocale()
|
static |
Parses locale string into distinct parts.
The format of locale is langu[email protected] odifi er.C HARSE T age_ COUNT
- Parameters
-
locale the locale string to split language set to the language part of the locale country set to the country part of the locale modifier set to the modifer part of the locale charset set to the charset part of the locale
Definition at line 94 of file klocale.cpp.
◆ thousandsSeparator()
QString KLocale::thousandsSeparator | ( | ) | const |
Returns what the thousands separator should look like ("," or "." etc.) according to the current locale or user settings.
- Returns
- The thousands separator used by locale.
Definition at line 180 of file klocale.cpp.
◆ timeFormat()
QString KLocale::timeFormat | ( | ) | const |
Returns the currently selected time format.
- Returns
- Current time format.
- See also
- setTimeFormat()
Definition at line 446 of file klocale.cpp.
◆ use12Clock()
bool KLocale::use12Clock | ( | ) | const |
Use this to determine if the user wants a 12 hour clock.
- Returns
- If the user wants 12h clock
- Deprecated:
- . A possible equivalent would be:
Definition at line 366 of file klocale.cpp.
◆ weekDayOfPray()
int KLocale::weekDayOfPray | ( | ) | const |
Use this to determine which day is reserved for religious observance.
- Since
- 4.2
- Returns
- day number (None = 0, Monday = 1, ..., Sunday = 7)
Definition at line 165 of file klocale.cpp.
◆ weekNumberSystem() [1/2]
KLocale::WeekNumberSystem KLocale::weekNumberSystem | ( | ) |
- Since
- 4.6
Returns the type of Week Number System used in this Locale
- See also
- Klocale::WeekNumberSystem
- setWeekNumberSystem()
- Returns
- the Week Number System used
Definition at line 636 of file klocale.cpp.
◆ weekNumberSystem() [2/2]
KLocale::WeekNumberSystem KLocale::weekNumberSystem | ( | ) | const |
- Since
- 4.7
Returns the type of Week Number System used in this Locale
- See also
- Klocale::WeekNumberSystem
- setWeekNumberSystem()
- Returns
- the Week Number System used
◆ weekStartDay()
int KLocale::weekStartDay | ( | ) | const |
Use this to determine which day is the first day of the week.
- Returns
- an integer (Monday=1..Sunday=7)
Definition at line 150 of file klocale.cpp.
◆ workingWeekEndDay()
int KLocale::workingWeekEndDay | ( | ) | const |
Use this to determine which day is the last working day of the week.
- Since
- 4.2
- Returns
- an integer (Monday=1..Sunday=7)
Definition at line 160 of file klocale.cpp.
◆ workingWeekStartDay()
int KLocale::workingWeekStartDay | ( | ) | const |
Use this to determine which day is the first working day of the week.
- Since
- 4.2
- Returns
- an integer (Monday=1..Sunday=7)
Definition at line 155 of file klocale.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Jan 31 2023 03:59:06 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.