#### PyKDE - Python Bindings for KDE

# class KLocale

Table of contents
Modules
kdecore Classes
All Classes

Module | kdecore
Class | KLocale
Inherits |

### enums

- MeasureSystem = {Metric, Imperial }
- ReadDateFlags = {NormalFormat, ShortFormat }
- ReadTimeFlags = {WithSeconds, WithoutSeconds }
- SignPosition = {ParensAround, BeforeQuantityMoney, AfterQuantityMoney, BeforeMoney, AfterMoney }

### methods

- KLocale (catalog, config = 0)

  returns a KLocale instance

  Argument | Type | Default
  --- | --- | ---
  catalog | QString |
  config | KConfig | 0

- KLocale (rhs)

  Not Implemented

- KLocale (a0)

  returns a KLocale instance

  Argument | Type | Default
  --- | --- | ---
  a0 | KLocale |

- _initLanguage (config)

  returns (QString)
  In versions KDE 3.0.1 and above only
  static

  Argument | Type | Default
  --- | --- | ---
  config | KConfigBase |

- allCountriesTwoAlpha ()

  returns (QStringList)
  In versions KDE 3.1.0 and above only

- allLanguagesTwoAlpha ()

  returns (QStringList)
  In versions KDE 3.1.0 and above only

- calendar ()

  returns (KCalendarSystem)
  In versions KDE 3.2.0 and above only

- calendarType ()

  returns (QString)
  In versions KDE 3.2.0 and above only

- charset ()

  Not Implemented

- codecForEncoding ()

  returns (QTextCodec)

- country ()

  returns (QString)

- currencySymbol ()

  returns (QString)

- dateFormat ()

  returns (QString)

- dateFormatShort ()

  returns (QString)

- dateMonthNamePossessive ()

  returns (bool)
  In versions KDE 3.1.0 and above only

- decimalSymbol ()

  returns (QString)

- defaultCountry ()

  returns (QString)
  static

- defaultLanguage ()

  returns (QString)
  static

- encoding ()

  returns (char)

- encodingMib ()

  returns (int)

- fileEncodingMib ()

  returns (int)
  In versions KDE 3.2.0 and above only

- formatDate (pDate, shortFormat = 0)

  returns (QString)

  Argument | Type | Default
  --- | --- | ---
  pDate | QDate |
  shortFormat | bool | 0

- formatDateTime (pDateTime, shortFormat, includeSecs = 0)

  returns (QString)

  Argument | Type | Default
  --- | --- | ---
  pDateTime | QDateTime |
  shortFormat | bool |
  includeSecs | bool | 0

- formatLong (num)

  returns (QString)
  In versions KDE 3.2.0 and above only

  Argument | Type | Default
  --- | --- | ---
  num | long |

- formatMoney (num, currency = QString .null, digits = -1)

  returns (QString)

  Argument | Type | Default
  --- | --- | ---
  num | double |
  currency | QString | QString .null
  digits | int | -1

- formatMoney (numStr)

  returns (QString)

  Argument | Type | Default
  --- | --- | ---
  numStr | QString |

- formatNumber (num, precision = -1)

  returns (QString)

  Argument | Type | Default
  --- | --- | ---
  num | double |
  precision | int | -1

- formatNumber (numStr)

  returns (QString)

  Argument | Type | Default
  --- | --- | ---
  numStr | QString |

- formatNumber (numStr, round, precision)

  returns (QString)
  In versions KDE 3.5.0 and above only

  Argument | Type | Default
  --- | --- | ---
  numStr | QString |
  round | bool |
  precision | int |

- formatTime (pTime, includeSecs, isDuration)

  returns (QString)
  In versions KDE 3.3.0 and above only

  Argument | Type | Default
  --- | --- | ---
  pTime | QTime |
  includeSecs | bool |
  isDuration | bool |

- formatTime (pTime, includeSecs = 0)

  returns (QString)

  Argument | Type | Default
  --- | --- | ---
  pTime | QTime |
  includeSecs | bool | 0

- fracDigits ()

  returns (int)

- initInstance ()

  Not Implemented

- insertCatalogue (catalog)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  catalog | QString |

- langLookup (fname, rtype = "html")

  returns (QString)
  static

  Argument | Type | Default
  --- | --- | ---
  fname | QString |
  rtype | char | "html"

- language ()

  returns (QString)

- languageList ()

  returns (QStringList)

- languages ()

  returns (QString)

- languagesTwoAlpha ()

  returns (QStringList)

- measureSystem ()

  returns (KLocale.MeasureSystem)

- monetaryDecimalSymbol ()

  returns (QString)

- monetaryThousandsSeparator ()

  returns (QString)

- monthName (i, shortName = 0)

  returns (QString)

  Argument | Type | Default
  --- | --- | ---
  i | int |
  shortName | bool | 0

- monthNamePossessive (i, shortName = 0)

  returns (QString)
  In versions KDE 3.1.0 and above only

  Argument | Type | Default
  --- | --- | ---
  i | int |
  shortName | bool | 0

- negativeMonetarySignPosition ()

  returns (SignPosition)

- negativePrefixCurrencySymbol ()

  returns (bool)

- negativeSign ()

  returns (QString)

- nounDeclension ()

  returns (bool)
  In versions KDE 3.1.0 and above only

- pageSize ()

  returns (int)

- positiveMonetarySignPosition ()

  returns (SignPosition)

- positivePrefixCurrencySymbol ()

  returns (bool)

- positiveSign ()

  returns (QString)

- readDate (str)

  returns (QDate) ok (bool)

  Argument | Type | Default
  --- | --- | ---
  str | QString |

- readDate (intstr, fmt)

  returns (QDate) ok (bool)

  Argument | Type | Default
  --- | --- | ---
  intstr | QString |
  fmt | QString |

- readDate (str, flags)

  returns (QDate) ok (bool)
  In versions KDE 3.2.0 and above only

  Argument | Type | Default
  --- | --- | ---
  str | QString |
  flags | KLocale.ReadDateFlags |

- readMoney (numStr)

  returns (double) ok (bool)

  Argument | Type | Default
  --- | --- | ---
  numStr | QString |

- readNumber (numStr)

  returns (double) ok (bool)

  Argument | Type | Default
  --- | --- | ---
  numStr | QString |

- readTime (str)

  returns (QTime) ok (bool)

  Argument | Type | Default
  --- | --- | ---
  str | QString |

- readTime (str, flags)

  returns (QTime) ok (bool)
  In versions KDE 3.2.0 and above only

  Argument | Type | Default
  --- | --- | ---
  str | QString |
  flags | KLocale.ReadTimeFlags |

- removeCatalogue (catalog)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  catalog | QString |

- setActiveCatalogue (catalog)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  catalog | QString |

- setCalendar (calendarType)

  returns nothing
  In versions KDE 3.2.0 and above only

  Argument | Type | Default
  --- | --- | ---
  calendarType | QString |

- setCharset (charset)

  Not Implemented

- setCountry (country)

  returns (bool)

  Argument | Type | Default
  --- | --- | ---
  country | QString |

- setCurrencySymbol (symbol)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  symbol | QString |

- setDateFormat (format)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  format | QString |

- setDateFormatShort (format)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  format | QString |

- setDateMonthNamePossessive (possessive)

  returns nothing
  In versions KDE 3.1.0 and above only

  Argument | Type | Default
  --- | --- | ---
  possessive | bool |

- setDecimalSymbol (symbol)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  symbol | QString |

- setEncoding (mibEnum)

  returns (bool)

  Argument | Type | Default
  --- | --- | ---
  mibEnum | int |

- setFracDigits (digits)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  digits | int |

- setLanguage (language)

  returns (bool)

  Argument | Type | Default
  --- | --- | ---
  language | QString |

- setLanguage (languages)

  returns (bool)

  Argument | Type | Default
  --- | --- | ---
  languages | QStringList |

- setMainCatalogue (catalog)

  returns nothing
  static

  Argument | Type | Default
  --- | --- | ---
  catalog | char |

- setMeasureSystem (value)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  value | KLocale.MeasureSystem |

- setMonetaryDecimalSymbol (symbol)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  symbol | QString |

- setMonetaryThousandsSeparator (separator)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  separator | QString |

- setNegativeMonetarySignPosition (signpos)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  signpos | KLocale.SignPosition |

- setNegativePrefixCurrencySymbol (prefix)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  prefix | bool |

- setNegativeSign (sign)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  sign | QString |

- setPageSize (paperFormat)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  paperFormat | int |

- setPositiveMonetarySignPosition (signpos)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  signpos | KLocale.SignPosition |

- setPositivePrefixCurrencySymbol (prefix)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  prefix | bool |

- setPositiveSign (sign)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  sign | QString |

- setThousandsSeparator (separator)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  separator | QString |

- setTimeFormat (format)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  format | QString |

- setWeekStartDay (day)

  returns nothing
  In versions KDE 3.1.0 and above only

  Argument | Type | Default
  --- | --- | ---
  day | int |

- setWeekStartsMonday (start)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  start | bool |

- splitLocale (str, language, country, charset)

  returns nothing
  static

  Argument | Type | Default
  --- | --- | ---
  str | QString |
  language | QString |
  country | QString |
  charset | QString |

- thousandsSeparator ()

  returns (QString)

- timeFormat ()

  returns (QString)

- translate (index)

  returns (QString)

  Argument | Type | Default
  --- | --- | ---
  index | char |

- translate (comment, fallback)

  returns (QString)

  Argument | Type | Default
  --- | --- | ---
  comment | char |
  fallback | char |

- translate (singular, plural, n)

  returns (QString)

  Argument | Type | Default
  --- | --- | ---
  singular | char |
  plural | char |
  n | ulong |

- translateQt (context, sourceText, message)

  returns (QString)

  Argument | Type | Default
  --- | --- | ---
  context | char |
  sourceText | char |
  message | char |

- twoAlphaToCountryName (code)

  returns (QString)
  In versions KDE 3.1.0 and above only

  Argument | Type | Default
  --- | --- | ---
  code | QString |

- twoAlphaToLanguageName (code)

  returns (QString)
  In versions KDE 3.1.0 and above only

  Argument | Type | Default
  --- | --- | ---
  code | QString |

- use12Clock ()

  returns (bool)

- weekDayName (i, shortName = 0)

  returns (QString)

  Argument | Type | Default
  --- | --- | ---
  i | int |
  shortName | bool | 0

- weekStartDay ()

  returns (int)
  In versions KDE 3.1.0 and above only

- weekStartsMonday ()

  returns (bool)