25 #include <tdelibs_export.h>
36 class TDELocalePrivate;
51 #define I18N_NOOP(x) x
62 #define I18N_NOOP2(comment,x) x
77 TDECORE_EXPORT TQString
i18n(
const char *text);
86 TDECORE_EXPORT TQString
i18n(
const char *comment,
const char *text);
99 TDECORE_EXPORT TQString
i18n(
const char *singular,
const char *plural,
unsigned long n);
107 inline TQString
tr2i18n(
const char* message,
const char* =0) {
108 return i18n(message);
178 TQString translate(
const char *index )
const;
205 TQString translate(
const char *comment,
const char *fallback)
const;
217 TQString translate(
const char *singular,
const char *plural,
218 unsigned long n)
const;
227 bool setEncoding(
int mibEnum);
238 bool setLanguage(
const TQString & language);
249 bool setLanguage(
const TQStringList & languages);
260 bool setCountry(
const TQString & country);
267 AfterQuantityMoney = 2,
268 BeforeMoney = 3, AfterMoney = 4 };
276 TQString decimalSymbol()
const;
285 TQString thousandsSeparator()
const;
293 TQString currencySymbol()
const;
302 TQString monetaryDecimalSymbol()
const;
311 TQString monetaryThousandsSeparator()
const;
319 TQString positiveSign()
const;
327 TQString negativeSign()
const;
335 int fracDigits()
const;
343 bool positivePrefixCurrencySymbol()
const;
351 bool negativePrefixCurrencySymbol()
const;
360 SignPosition positiveMonetarySignPosition()
const;
369 SignPosition negativeMonetarySignPosition()
const;
385 TQString formatMoney(
double num,
386 const TQString & currency = TQString::null,
387 int digits = -1)
const;
404 TQString formatNumber(
double num,
int precision = -1)
const;
413 TQString formatNumber(
const TQString &numStr)
const TDE_DEPRECATED;
428 TQString formatNumber(
const TQString &numStr,
bool round,
int precision)
const;
441 TQString formatLong(
long num)
const;
451 bool nounDeclension()
const;
462 TQString formatDate(
const TQDate &pDate,
bool shortFormat =
false)
const;
471 bool dateMonthNamePossessive()
const;
485 TQString formatTime(
const TQTime &pTime,
bool includeSecs,
bool isDuration )
const;
497 TQString formatTime(
const TQTime &pTime,
bool includeSecs =
false)
const;
504 bool use12Clock()
const;
515 bool weekStartsMonday() const TDE_DEPRECATED;
523 int weekStartDay() const;
545 TQString monthName(
int i,
bool shortName = false) const TDE_DEPRECATED;
570 TQString monthNamePossessive(
int i,
bool shortName = false) const TDE_DEPRECATED;
582 TQString weekDayName(
int i,
bool shortName = false) const TDE_DEPRECATED;
599 TQString calendarType() const;
609 void setCalendar(const TQString & calendarType);
621 TQString formatDateTime(const TQDateTime &pDateTime,
622 bool shortFormat = true,
623 bool includeSecs = false) const;
634 double readMoney(const TQString &numStr,
bool * ok = 0) const;
645 double readNumber(const TQString &numStr,
bool * ok = 0) const;
657 TQDate readDate(const TQString &str,
bool* ok = 0) const;
663 TQDate readDate( const TQString &intstr, const TQString &fmt,
bool* ok = 0) const;
683 TQDate readDate(
const TQString &str, ReadDateFlags flags,
bool *ok = 0)
const;
697 TQTime readTime(
const TQString &str,
bool* ok = 0)
const;
717 TQTime readTime(
const TQString &str, ReadTimeFlags flags,
bool *ok = 0)
const;
726 TQString language()
const;
734 TQString country()
const;
749 TQStringList languagesTwoAlpha()
const;
759 TQStringList languageList()
const;
769 const char * encoding()
const;
779 int encodingMib()
const;
788 TQTextCodec * codecForEncoding()
const;
798 int fileEncodingMib()
const;
822 void setDateFormat(
const TQString & format);
845 void setDateFormatShort(
const TQString & format);
852 void setDateMonthNamePossessive(
bool possessive);
872 void setTimeFormat(
const TQString & format);
883 void setWeekStartsMonday(
bool start) TDE_DEPRECATED;
891 void setWeekStartDay(
int day);
898 TQString dateFormat()
const;
905 TQString dateFormatShort()
const;
912 TQString timeFormat()
const;
919 void setDecimalSymbol(
const TQString & symbol);
925 void setThousandsSeparator(
const TQString & separator);
932 void setPositiveSign(
const TQString & sign);
938 void setNegativeSign(
const TQString & sign);
944 void setPositiveMonetarySignPosition(SignPosition signpos);
950 void setNegativeMonetarySignPosition(SignPosition signpos);
958 void setPositivePrefixCurrencySymbol(
bool prefix);
966 void setNegativePrefixCurrencySymbol(
bool prefix);
972 void setFracDigits(
int digits);
978 void setMonetaryThousandsSeparator(
const TQString & separator);
985 void setMonetaryDecimalSymbol(
const TQString & symbol);
991 void setCurrencySymbol(
const TQString & symbol);
998 int pageSize()
const;
1005 void setPageSize(
int paperFormat);
1018 MeasureSystem measureSystem()
const;
1025 void setMeasureSystem(MeasureSystem value);
1037 void insertCatalogue(
const TQString& catalog);
1044 void removeCatalogue(
const TQString &catalog);
1050 void setActiveCatalogue(
const TQString &catalog);
1058 TQString translateQt(
const char *context,
1059 const char *sourceText,
1060 const char *message)
const;
1067 TQStringList allLanguagesTwoAlpha()
const;
1075 TQString twoAlphaToLanguageName(
const TQString &code)
const;
1082 TQStringList allCountriesTwoAlpha()
const;
1090 TQString twoAlphaToCountryName(
const TQString &code)
const;
1101 static void splitLocale(
const TQString & str,
1102 TQString & language,
1104 TQString & charset);
1114 static void setMainCatalogue(
const char *catalog);
1122 static TQString langLookup(
const TQString &fname,
const char *rtype =
"html");
1129 static TQString defaultLanguage();
1136 static TQString defaultCountry();
1144 #ifdef KDE_NO_COMPAT
1151 TQString formatMoney(
const TQString &numStr)
const TDE_DEPRECATED;
1159 TQString languages() const TDE_DEPRECATED;
1165 bool setCharset(const TQString & charset) TDE_DEPRECATED;
1171 TQString charset() const TDE_DEPRECATED;
1178 static
void initInstance();
1195 void initMainCatalogues(const TQString & catalog);
1223 static TQCString encodeFileNameUTF8( const TQString & fileName );
1228 static TQString decodeFileNameUTF8( const TQCString & localFileName );
1239 void doFormatInit() const;
1249 TQString translate_priv(const
char *index,
1251 const
char ** original = 0,
1252 int* pluralType = 0) const;
1257 bool useDefaultLanguage() const;
1262 bool isLanguageInstalled(const TQString & language) const;
1268 void updateCatalogues( );
1273 void initPluralTypes( );
1279 int pluralType( const TQString & language );
1301 static TQString catalogueFileName(const TQString & language,
1309 bool isApplicationTranslatedInto( const TQString & language);
1313 TQString m_decimalSymbol;
1314 TQString m_thousandsSeparator;
1315 TQString m_currencySymbol;
1316 TQString m_monetaryDecimalSymbol;
1317 TQString m_monetaryThousandsSeparator;
1318 TQString m_positiveSign;
1319 TQString m_negativeSign;
1321 SignPosition m_positiveMonetarySignPosition;
1322 SignPosition m_negativeMonetarySignPosition;
1325 TQString m_timeFormat;
1326 TQString m_dateFormat;
1327 TQString m_dateFormatShort;
1329 TQString m_language;
1332 bool m_weekStartsMonday;
1333 bool m_positivePrefixCurrencySymbol;
1334 bool m_negativePrefixCurrencySymbol;
1336 TDELocalePrivate *d;
CalendarSystem abstract class, default derived kde gregorian class and factory class.
This class abstracts a gettext message catalog.
KDE Configuration Management abstract base class.
Access KDE Configuration entries.
Access to the KDE global objects.
static TDEConfig * config()
Returns the general config object.
TDELocale provides support for country specific stuff like the national language.
SignPosition
Various positions for where to place the positive or negative sign when they are related to a monetar...
TQString i18n(const char *text)
i18n is the function that does everything you need to translate a string.
MeasureSystem
The Metric system will give you information in mm, while the Imperial system will give you informatio...
TQString tr2i18n(const char *message, const char *=0)
Qt3's uic generates i18n( "msg", "comment" ) calls which conflict with our i18n method.