PyKDE - Python Bindings for KDE
class KLocale
Table of contents
Modules
tdecore Classes
All Classes
Module
tdecore
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
TQString
config
KConfig
0
KLocale
(rhs)
Not Implemented
KLocale
(a0)
returns
a KLocale instance
Argument
Type
Default
a0
KLocale
_initLanguage
(config)
returns
(TQString)
In versions KDE 3.0.1 and above only
static
Argument
Type
Default
config
KConfigBase
allCountriesTwoAlpha
()
returns
(TQStringList)
In versions KDE 3.1.0 and above only
allLanguagesTwoAlpha
()
returns
(TQStringList)
In versions KDE 3.1.0 and above only
calendar
()
returns
(KCalendarSystem)
In versions KDE 3.2.0 and above only
calendarType
()
returns
(TQString)
In versions KDE 3.2.0 and above only
charset
()
Not Implemented
codecForEncoding
()
returns
(TQTextCodec)
country
()
returns
(TQString)
currencySymbol
()
returns
(TQString)
dateFormat
()
returns
(TQString)
dateFormatShort
()
returns
(TQString)
dateMonthNamePossessive
()
returns
(bool)
In versions KDE 3.1.0 and above only
decimalSymbol
()
returns
(TQString)
defaultCountry
()
returns
(TQString)
static
defaultLanguage
()
returns
(TQString)
static
encoding
()
returns
(char)
encodingMib
()
returns
(int)
fileEncodingMib
()
returns
(int)
In versions KDE 3.2.0 and above only
formatDate
(pDate, shortFormat = 0)
returns
(TQString)
Argument
Type
Default
pDate
TQDate
shortFormat
bool
0
formatDateTime
(pDateTime, shortFormat, includeSecs = 0)
returns
(TQString)
Argument
Type
Default
pDateTime
TQDateTime
shortFormat
bool
includeSecs
bool
0
formatLong
(num)
returns
(TQString)
In versions KDE 3.2.0 and above only
Argument
Type
Default
num
long
formatMoney
(num, currency = TQString .null, digits = -1)
returns
(TQString)
Argument
Type
Default
num
double
currency
TQString
TQString .null
digits
int
-1
formatMoney
(numStr)
returns
(TQString)
Argument
Type
Default
numStr
TQString
formatNumber
(num, precision = -1)
returns
(TQString)
Argument
Type
Default
num
double
precision
int
-1
formatNumber
(numStr)
returns
(TQString)
Argument
Type
Default
numStr
TQString
formatNumber
(numStr, round, precision)
returns
(TQString)
In versions KDE 3.5.0 and above only
Argument
Type
Default
numStr
TQString
round
bool
precision
int
formatTime
(pTime, includeSecs, isDuration)
returns
(TQString)
In versions KDE 3.3.0 and above only
Argument
Type
Default
pTime
TQTime
includeSecs
bool
isDuration
bool
formatTime
(pTime, includeSecs = 0)
returns
(TQString)
Argument
Type
Default
pTime
TQTime
includeSecs
bool
0
fracDigits
()
returns
(int)
initInstance
()
Not Implemented
insertCatalogue
(catalog)
returns
nothing
Argument
Type
Default
catalog
TQString
langLookup
(fname, rtype = "html")
returns
(TQString)
static
Argument
Type
Default
fname
TQString
rtype
char
"html"
language
()
returns
(TQString)
languageList
()
returns
(TQStringList)
languages
()
returns
(TQString)
languagesTwoAlpha
()
returns
(TQStringList)
measureSystem
()
returns
(KLocale.MeasureSystem)
monetaryDecimalSymbol
()
returns
(TQString)
monetaryThousandsSeparator
()
returns
(TQString)
monthName
(i, shortName = 0)
returns
(TQString)
Argument
Type
Default
i
int
shortName
bool
0
monthNamePossessive
(i, shortName = 0)
returns
(TQString)
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
(TQString)
nounDeclension
()
returns
(bool)
In versions KDE 3.1.0 and above only
pageSize
()
returns
(int)
positiveMonetarySignPosition
()
returns
(SignPosition)
positivePrefixCurrencySymbol
()
returns
(bool)
positiveSign
()
returns
(TQString)
readDate
(str)
returns
(TQDate) ok (bool)
Argument
Type
Default
str
TQString
readDate
(intstr, fmt)
returns
(TQDate) ok (bool)
Argument
Type
Default
intstr
TQString
fmt
TQString
readDate
(str, flags)
returns
(TQDate) ok (bool)
In versions KDE 3.2.0 and above only
Argument
Type
Default
str
TQString
flags
KLocale.ReadDateFlags
readMoney
(numStr)
returns
(double) ok (bool)
Argument
Type
Default
numStr
TQString
readNumber
(numStr)
returns
(double) ok (bool)
Argument
Type
Default
numStr
TQString
readTime
(str)
returns
(TQTime) ok (bool)
Argument
Type
Default
str
TQString
readTime
(str, flags)
returns
(TQTime) ok (bool)
In versions KDE 3.2.0 and above only
Argument
Type
Default
str
TQString
flags
KLocale.ReadTimeFlags
removeCatalogue
(catalog)
returns
nothing
Argument
Type
Default
catalog
TQString
setActiveCatalogue
(catalog)
returns
nothing
Argument
Type
Default
catalog
TQString
setCalendar
(calendarType)
returns
nothing
In versions KDE 3.2.0 and above only
Argument
Type
Default
calendarType
TQString
setCharset
(charset)
Not Implemented
setCountry
(country)
returns
(bool)
Argument
Type
Default
country
TQString
setCurrencySymbol
(symbol)
returns
nothing
Argument
Type
Default
symbol
TQString
setDateFormat
(format)
returns
nothing
Argument
Type
Default
format
TQString
setDateFormatShort
(format)
returns
nothing
Argument
Type
Default
format
TQString
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
TQString
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
TQString
setLanguage
(languages)
returns
(bool)
Argument
Type
Default
languages
TQStringList
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
TQString
setMonetaryThousandsSeparator
(separator)
returns
nothing
Argument
Type
Default
separator
TQString
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
TQString
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
TQString
setThousandsSeparator
(separator)
returns
nothing
Argument
Type
Default
separator
TQString
setTimeFormat
(format)
returns
nothing
Argument
Type
Default
format
TQString
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
TQString
language
TQString
country
TQString
charset
TQString
thousandsSeparator
()
returns
(TQString)
timeFormat
()
returns
(TQString)
translate
(index)
returns
(TQString)
Argument
Type
Default
index
char
translate
(comment, fallback)
returns
(TQString)
Argument
Type
Default
comment
char
fallback
char
translate
(singular, plural, n)
returns
(TQString)
Argument
Type
Default
singular
char
plural
char
n
ulong
translateTQt
(context, sourceText, message)
returns
(TQString)
Argument
Type
Default
context
char
sourceText
char
message
char
twoAlphaToCountryName
(code)
returns
(TQString)
In versions KDE 3.1.0 and above only
Argument
Type
Default
code
TQString
twoAlphaToLanguageName
(code)
returns
(TQString)
In versions KDE 3.1.0 and above only
Argument
Type
Default
code
TQString
use12Clock
()
returns
(bool)
weekDayName
(i, shortName = 0)
returns
(TQString)
Argument
Type
Default
i
int
shortName
bool
0
weekStartDay
()
returns
(int)
In versions KDE 3.1.0 and above only
weekStartsMonday
()
returns
(bool)