Update contrib.
2 * Copyright (c) 1994-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
24 Gets the current language type.
25 @return language type.
27 EXPORT_C TLanguage Locl::Language()
30 return(LLocaleData::Language);
34 Creates the localisation table.
35 @param aLocale A pointer to the structure to be created. It holds
36 the system's locale settings.
38 EXPORT_C void Locl::LocaleData(SLocaleData *aLocale)
41 aLocale->iCountryCode=LLocaleData::CountryCode;
42 aLocale->iUniversalTimeOffset=LLocaleData::UniversalTimeOffset;
43 aLocale->iDateFormat=LLocaleData::DateFormat;
44 aLocale->iTimeFormat=LLocaleData::TimeFormat;
45 aLocale->iCurrencySymbolPosition=LLocaleData::CurrencySymbolPosition;
46 aLocale->iCurrencySpaceBetween=LLocaleData::CurrencySpaceBetween;
47 aLocale->iCurrencyDecimalPlaces=LLocaleData::CurrencyDecimalPlaces;
48 aLocale->iNegativeCurrencyFormat=TNegativeCurrencyFormat(LLocaleData::NegativeCurrencyFormat); // replaces iCurrencyNegativeInBrackets
49 aLocale->iCurrencyTriadsAllowed=LLocaleData::CurrencyTriadsAllowed;
50 aLocale->iThousandsSeparator=*LLocaleData::ThousandsSeparator;
51 aLocale->iDecimalSeparator=*LLocaleData::DecimalSeparator;
53 for(;i<KMaxDateSeparators;i++)
54 aLocale->iDateSeparator[i]=*LLocaleData::DateSeparator[i];
55 for(i=0;i<KMaxTimeSeparators;i++)
56 aLocale->iTimeSeparator[i]=*LLocaleData::TimeSeparator[i];
57 aLocale->iAmPmSymbolPosition=LLocaleData::AmPmSymbolPosition;
58 aLocale->iAmPmSpaceBetween=LLocaleData::AmPmSpaceBetween;
59 // aLocale->iDaylightSaving=LLocaleData::DaylightSaving;
60 aLocale->iHomeDaylightSavingZone=LLocaleData::HomeDaylightSavingZone;
61 aLocale->iWorkDays=LLocaleData::WorkDays;
62 aLocale->iStartOfWeek=LLocaleData::StartOfWeek;
63 aLocale->iClockFormat=LLocaleData::ClockFormat;
64 aLocale->iUnitsGeneral=LLocaleData::UnitsGeneral;
65 aLocale->iUnitsDistanceLong=LLocaleData::UnitsDistanceLong;
66 aLocale->iUnitsDistanceShort=LLocaleData::UnitsDistanceShort;
67 aLocale->iExtraNegativeCurrencyFormatFlags=LLocaleData::ExtraNegativeCurrencyFormatFlags;
68 aLocale->iLanguageDowngrade[0] = static_cast<TUint16>(LLocaleData::LanguageDowngrade[0]);
69 aLocale->iLanguageDowngrade[1] = static_cast<TUint16>(LLocaleData::LanguageDowngrade[1]);
70 aLocale->iLanguageDowngrade[2] = static_cast<TUint16>(LLocaleData::LanguageDowngrade[2]);
74 Gets the address of the currency symbol, e.g. '$' for US dollar.
75 @return The address of the currency symbol.
77 EXPORT_C const TText * Locl::CurrencySymbol()
80 return(LLocaleData::CurrencySymbol);
84 Gets the address of the short date format.
85 @return The address of the short date format.
87 EXPORT_C const TText* Locl::ShortDateFormatSpec()
90 return(LLocaleData::ShortDateFormatSpec);
94 Gets the address of the long date format.
95 @return The address of the long date format.
97 EXPORT_C const TText* Locl::LongDateFormatSpec()
100 return(LLocaleData::LongDateFormatSpec);
104 Gets the address of the time format.
105 @return The address of the time format.
107 EXPORT_C const TText* Locl::TimeFormatSpec()
110 return(LLocaleData::TimeFormatSpec);
114 Gets the address of the FAT utility functions.
115 @return The address of the FAT utility functions.
117 EXPORT_C const TFatUtilityFunctions* Locl::FatUtilityFunctions()
120 return(LLocaleData::FatUtilityFunctions);
124 Gets the address of the date suffix table. A date suffix table
125 stores the suffix strings of the 31 days in a month, e.g. in English,
126 "st" for first day of the month, "nd" for the second day of the month.
127 @return The address of the date suffix table.
129 EXPORT_C const TText * const * Locl::DateSuffixTable()
132 return(&LLanguage::DateSuffixTable[0]);
136 Gets the address of the day table, which stores the names
137 of weekdays. In English, it starts with "Monday" and ends
139 @return The address of the day table.
141 EXPORT_C const TText * const * Locl::DayTable()
144 return(&LLanguage::DayTable[0]);
148 Gets the address of the abbreviated day table, which stores
149 the abbreviated names of weekdays. In English, it starts
150 with "Mon" and ends with "Sun".
151 @return The address of the abbreviated day table.
153 EXPORT_C const TText * const * Locl::DayAbbTable()
156 return(&LLanguage::DayAbbTable[0]);
160 Gets the address of the month table, which stores
161 the names of the months. In English, it starts with
162 "January", and ends with "December".
163 @return The address of the month table.
165 EXPORT_C const TText * const * Locl::MonthTable()
168 return(&LLanguage::MonthTable[0]);
172 Gets the address of the abbreviated month table, which stores
173 the abbreviated names of the months, In English, it starts
174 with "Jan", and ends with "Dec".
175 @return The address of the month table.
177 EXPORT_C const TText * const * Locl::MonthAbbTable()
180 return(&LLanguage::MonthAbbTable[0]);
184 Gets the address of the AmPm table, which stores the expression
185 for the morning and the afternoon, in English, "am" for the
186 morning and "pm" for the afternoon.
187 @return The address of the AmPm table.
189 EXPORT_C const TText * const * Locl::AmPmTable()
192 return(&LLanguage::AmPmTable[0]);
196 Gets the address of the message table. The message table contains
197 messages that the base software may need to issue without the
198 benefit of access to compiled resources.
199 @return The address of the message table.
201 EXPORT_C const TText * const * Locl::MsgTable()
204 return(&LMessages::MsgTable[0]);
208 Gets the address of the locale character set object which contains
209 collation rules etc. It is used in Unicode builds to supply
210 locale-specific character attribute and collation data.
211 @return The address of the locale character set object, or NULL
212 in case of a non-UNICODE build.
214 EXPORT_C const LCharSet* Locl::CharSet()
224 Gets the address of the character type conversion table.
225 The character type conversion table does not exist in
226 the Unicode build. This table has 256 items which classifies
227 256 ASCII codes into: Uppercase letter, Lowercase letter,
228 Punctuation, Decimal digit etc..
229 @return The address of the character type conversion table,
230 or NULL in case of a UNICODE build.
232 EXPORT_C const TUint8 * Locl::TypeTable()
237 return(&LAlphabet::TypeTable[0]);
243 Gets the address of the uppercase table. The uppercase table
244 does not exist in the Unicode build. It is used to convert
245 the letter in lowercase to uppercase.
246 @return The address of the uppercase table, or NULL
247 in case of a UNICODE build.
249 EXPORT_C const TText * Locl::UpperTable()
254 return(&LAlphabet::UpperTable[0]);
260 Gets the address of the lowercase table. The lowercase table
261 does not exist in the Unicode build. It is used to convert
262 the letter in uppercase to lowercase.
263 @return The address of the lowercase table, or NULL
264 in case of a UNICODE build.
266 EXPORT_C const TText * Locl::LowerTable()
271 return(&LAlphabet::LowerTable[0]);
276 Gets the address of the fold table. The fold table does not exist
277 in the Unicode build. It is used to fold the character according
278 to a specified folding method: converting characters to their
279 lower case form, if any; stripping accents; converting digits
280 representing values 0..9 to characters '0'..'9' etc..
281 @return The address of the fold table, or NULL
282 in case of a UNICODE build.
284 EXPORT_C const TText * Locl::FoldTable()
290 return(&LAlphabet::FoldTable[0]);
295 Gets the address of the collate table. The collate table does
296 not exist in the Unicode build. This table is used to collate
297 strings to remove differences between characters that are deemed
298 unimportant for the purposes of ordering characters.
299 @return The address of the collate table, or NULL
300 in case of a UNICODE build.
302 EXPORT_C const TText * Locl::CollTable()
307 return(&LAlphabet::CollTable[0]);
312 Check whether it is a Unicode Build.
313 @return ETrue for Unicode Build, EFalse for non-Unicode Build.
315 EXPORT_C TBool Locl::UniCode()