Update contrib.
1 // Copyright (c) 1994-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // f32test\locl\t_table.cpp
18 #include <kernel/localise.h>
20 EXPORT_C TLanguage Locl::Language()
22 // Returns the language type.
26 return(LCountry::Language);
29 EXPORT_C void Locl::LocaleData(SLocaleData *aLocale)
31 // Create the localisation table.
35 aLocale->iCountryCode=LCountry::CountryCode;
36 aLocale->iUniversalTimeOffset=LCountry::UniversalTimeOffset;
37 aLocale->iDateFormat=LCountry::DateFormat;
38 aLocale->iTimeFormat=LCountry::TimeFormat;
39 aLocale->iCurrencySymbolPosition=LCountry::CurrencySymbolPosition;
40 aLocale->iCurrencySpaceBetween=LCountry::CurrencySpaceBetween;
41 aLocale->iCurrencyDecimalPlaces=LCountry::CurrencyDecimalPlaces;
42 aLocale->iNegativeCurrencyFormat=(TNegativeCurrencyFormat)LCountry::CurrencyNegativeInBrackets;
43 aLocale->iCurrencyTriadsAllowed=LCountry::CurrencyTriadsAllowed;
44 aLocale->iThousandsSeparator=*LCountry::ThousandsSeparator;
45 aLocale->iDecimalSeparator=*LCountry::DecimalSeparator;
47 for(;i<KMaxDateSeparators;i++)
48 aLocale->iDateSeparator[i]=*LCountry::DateSeparator[i];
49 for(i=0;i<KMaxTimeSeparators;i++)
50 aLocale->iTimeSeparator[i]=*LCountry::TimeSeparator[i];
51 aLocale->iAmPmSymbolPosition=LCountry::AmPmSymbolPosition;
52 aLocale->iAmPmSpaceBetween=LCountry::AmPmSpaceBetween;
53 // aLocale->iDaylightSaving=LCountry::DaylightSaving;
54 aLocale->iHomeDaylightSavingZone=LCountry::HomeDaylightSavingZone;
55 aLocale->iWorkDays=LCountry::WorkDays;
56 aLocale->iStartOfWeek=LCountry::StartOfWeek;
57 aLocale->iClockFormat=LCountry::ClockFormat;
58 aLocale->iUnitsGeneral=LCountry::UnitsGeneral;
59 aLocale->iUnitsDistanceLong=LCountry::UnitsGeneral;
60 aLocale->iUnitsDistanceShort=LCountry::UnitsGeneral;
63 EXPORT_C const TText * Locl::CurrencySymbol()
65 // Returns the address of the currency symbol.
69 return(LCountry::CurrencySymbol);
72 EXPORT_C const TText* Locl::ShortDateFormatSpec()
74 // Returns the address of the short date format.
78 return(LCountry::ShortDateFormatSpec);
81 EXPORT_C const TText* Locl::LongDateFormatSpec()
83 // Returns the address of the long date format.
87 return(LCountry::LongDateFormatSpec);
90 EXPORT_C const TText* Locl::TimeFormatSpec()
92 // Returns the address of the long date format.
96 return(LCountry::TimeFormatSpec);
99 EXPORT_C const TFatUtilityFunctions* Locl::FatUtilityFunctions()
101 // Returns the addresses of the FAT utility functions.
105 return(LCountry::FatUtilityFunctions);
108 EXPORT_C const TText * const * Locl::DateSuffixTable()
110 // Returns the address of the date suffix table.
114 return(&LLanguage::DateSuffixTable[0]);
117 EXPORT_C const TText * const * Locl::DayTable()
119 // Returns the address of the day table.
123 return(&LLanguage::DayTable[0]);
126 EXPORT_C const TText * const * Locl::DayAbbTable()
128 // Returns the address of the abbreviated day table.
132 return(&LLanguage::DayAbbTable[0]);
135 EXPORT_C const TText * const * Locl::MonthTable()
137 // Returns the address of the month table.
141 return(&LLanguage::MonthTable[0]);
144 EXPORT_C const TText * const * Locl::MonthAbbTable()
146 // Returns the address of the abbreviated month table.
150 return(&LLanguage::MonthAbbTable[0]);
153 EXPORT_C const TText * const * Locl::AmPmTable()
155 // Returns the address of the AmPm table.
159 return(&LLanguage::AmPmTable[0]);
162 EXPORT_C const TText * const * Locl::MsgTable()
164 // Returns the address of the message table.
168 return(&LMessages::MsgTable[0]);
171 // Return the address of the locale character set object: contains collation rules etc.
172 EXPORT_C const LCharSet* Locl::CharSet()
181 // The functions returning locale-specific character attribute tables do not exist in the Unicode build.
182 EXPORT_C const TUint8 * Locl::TypeTable()
184 // Return the address of the type table.
190 return(&LAlphabet::TypeTable[0]);
195 EXPORT_C const TText * Locl::UpperTable()
197 // Return the address of the upper table.
203 return(&LAlphabet::UpperTable[0]);
209 EXPORT_C const TText * Locl::LowerTable()
211 // Return the address of the lower table.
217 return(&LAlphabet::LowerTable[0]);
222 EXPORT_C const TText * Locl::FoldTable()
224 // Return the address of the fold table.
230 return(&LAlphabet::FoldTable[0]);
234 EXPORT_C const TText * Locl::CollTable()
236 // Return the address of the collate table.
242 return(&LAlphabet::CollTable[0]);
246 EXPORT_C TBool Locl::UniCode()
248 // Returns ETrue for Unicode Build