sl@0: // Copyright (c) 1994-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // f32test\locl\t_table.cpp sl@0: // sl@0: // sl@0: sl@0: #include sl@0: sl@0: EXPORT_C TLanguage Locl::Language() sl@0: // sl@0: // Returns the language type. sl@0: // sl@0: { sl@0: sl@0: return(LCountry::Language); sl@0: } sl@0: sl@0: EXPORT_C void Locl::LocaleData(SLocaleData *aLocale) sl@0: // sl@0: // Create the localisation table. sl@0: // sl@0: { sl@0: sl@0: aLocale->iCountryCode=LCountry::CountryCode; sl@0: aLocale->iUniversalTimeOffset=LCountry::UniversalTimeOffset; sl@0: aLocale->iDateFormat=LCountry::DateFormat; sl@0: aLocale->iTimeFormat=LCountry::TimeFormat; sl@0: aLocale->iCurrencySymbolPosition=LCountry::CurrencySymbolPosition; sl@0: aLocale->iCurrencySpaceBetween=LCountry::CurrencySpaceBetween; sl@0: aLocale->iCurrencyDecimalPlaces=LCountry::CurrencyDecimalPlaces; sl@0: aLocale->iNegativeCurrencyFormat=(TNegativeCurrencyFormat)LCountry::CurrencyNegativeInBrackets; sl@0: aLocale->iCurrencyTriadsAllowed=LCountry::CurrencyTriadsAllowed; sl@0: aLocale->iThousandsSeparator=*LCountry::ThousandsSeparator; sl@0: aLocale->iDecimalSeparator=*LCountry::DecimalSeparator; sl@0: TInt i=0; sl@0: for(;iiDateSeparator[i]=*LCountry::DateSeparator[i]; sl@0: for(i=0;iiTimeSeparator[i]=*LCountry::TimeSeparator[i]; sl@0: aLocale->iAmPmSymbolPosition=LCountry::AmPmSymbolPosition; sl@0: aLocale->iAmPmSpaceBetween=LCountry::AmPmSpaceBetween; sl@0: // aLocale->iDaylightSaving=LCountry::DaylightSaving; sl@0: aLocale->iHomeDaylightSavingZone=LCountry::HomeDaylightSavingZone; sl@0: aLocale->iWorkDays=LCountry::WorkDays; sl@0: aLocale->iStartOfWeek=LCountry::StartOfWeek; sl@0: aLocale->iClockFormat=LCountry::ClockFormat; sl@0: aLocale->iUnitsGeneral=LCountry::UnitsGeneral; sl@0: aLocale->iUnitsDistanceLong=LCountry::UnitsGeneral; sl@0: aLocale->iUnitsDistanceShort=LCountry::UnitsGeneral; sl@0: } sl@0: sl@0: EXPORT_C const TText * Locl::CurrencySymbol() sl@0: // sl@0: // Returns the address of the currency symbol. sl@0: // sl@0: { sl@0: sl@0: return(LCountry::CurrencySymbol); sl@0: } sl@0: sl@0: EXPORT_C const TText* Locl::ShortDateFormatSpec() sl@0: // sl@0: // Returns the address of the short date format. sl@0: // sl@0: { sl@0: sl@0: return(LCountry::ShortDateFormatSpec); sl@0: } sl@0: sl@0: EXPORT_C const TText* Locl::LongDateFormatSpec() sl@0: // sl@0: // Returns the address of the long date format. sl@0: // sl@0: { sl@0: sl@0: return(LCountry::LongDateFormatSpec); sl@0: } sl@0: sl@0: EXPORT_C const TText* Locl::TimeFormatSpec() sl@0: // sl@0: // Returns the address of the long date format. sl@0: // sl@0: { sl@0: sl@0: return(LCountry::TimeFormatSpec); sl@0: } sl@0: sl@0: EXPORT_C const TFatUtilityFunctions* Locl::FatUtilityFunctions() sl@0: // sl@0: // Returns the addresses of the FAT utility functions. sl@0: // sl@0: { sl@0: sl@0: return(LCountry::FatUtilityFunctions); sl@0: } sl@0: sl@0: EXPORT_C const TText * const * Locl::DateSuffixTable() sl@0: // sl@0: // Returns the address of the date suffix table. sl@0: // sl@0: { sl@0: sl@0: return(&LLanguage::DateSuffixTable[0]); sl@0: } sl@0: sl@0: EXPORT_C const TText * const * Locl::DayTable() sl@0: // sl@0: // Returns the address of the day table. sl@0: // sl@0: { sl@0: sl@0: return(&LLanguage::DayTable[0]); sl@0: } sl@0: sl@0: EXPORT_C const TText * const * Locl::DayAbbTable() sl@0: // sl@0: // Returns the address of the abbreviated day table. sl@0: // sl@0: { sl@0: sl@0: return(&LLanguage::DayAbbTable[0]); sl@0: } sl@0: sl@0: EXPORT_C const TText * const * Locl::MonthTable() sl@0: // sl@0: // Returns the address of the month table. sl@0: // sl@0: { sl@0: sl@0: return(&LLanguage::MonthTable[0]); sl@0: } sl@0: sl@0: EXPORT_C const TText * const * Locl::MonthAbbTable() sl@0: // sl@0: // Returns the address of the abbreviated month table. sl@0: // sl@0: { sl@0: sl@0: return(&LLanguage::MonthAbbTable[0]); sl@0: } sl@0: sl@0: EXPORT_C const TText * const * Locl::AmPmTable() sl@0: // sl@0: // Returns the address of the AmPm table. sl@0: // sl@0: { sl@0: sl@0: return(&LLanguage::AmPmTable[0]); sl@0: } sl@0: sl@0: EXPORT_C const TText * const * Locl::MsgTable() sl@0: // sl@0: // Returns the address of the message table. sl@0: // sl@0: { sl@0: sl@0: return(&LMessages::MsgTable[0]); sl@0: } sl@0: sl@0: // Return the address of the locale character set object: contains collation rules etc. sl@0: EXPORT_C const LCharSet* Locl::CharSet() sl@0: { sl@0: #ifdef _UNICODE sl@0: return &TheCharSet; sl@0: #else sl@0: return NULL; sl@0: #endif sl@0: } sl@0: sl@0: // The functions returning locale-specific character attribute tables do not exist in the Unicode build. sl@0: EXPORT_C const TUint8 * Locl::TypeTable() sl@0: // sl@0: // Return the address of the type table. sl@0: // sl@0: { sl@0: #ifdef _UNICODE sl@0: return NULL; sl@0: #else sl@0: return(&LAlphabet::TypeTable[0]); sl@0: #endif sl@0: } sl@0: sl@0: sl@0: EXPORT_C const TText * Locl::UpperTable() sl@0: // sl@0: // Return the address of the upper table. sl@0: // sl@0: { sl@0: #ifdef _UNICODE sl@0: return NULL; sl@0: #else sl@0: return(&LAlphabet::UpperTable[0]); sl@0: #endif sl@0: sl@0: } sl@0: sl@0: sl@0: EXPORT_C const TText * Locl::LowerTable() sl@0: // sl@0: // Return the address of the lower table. sl@0: // sl@0: { sl@0: #ifdef _UNICODE sl@0: return NULL; sl@0: #else sl@0: return(&LAlphabet::LowerTable[0]); sl@0: #endif sl@0: } sl@0: sl@0: sl@0: EXPORT_C const TText * Locl::FoldTable() sl@0: // sl@0: // Return the address of the fold table. sl@0: // sl@0: { sl@0: #ifdef _UNICODE sl@0: return NULL; sl@0: #else sl@0: return(&LAlphabet::FoldTable[0]); sl@0: #endif sl@0: } sl@0: sl@0: EXPORT_C const TText * Locl::CollTable() sl@0: // sl@0: // Return the address of the collate table. sl@0: // sl@0: { sl@0: #ifdef _UNICODE sl@0: return NULL; sl@0: #else sl@0: return(&LAlphabet::CollTable[0]); sl@0: #endif sl@0: } sl@0: sl@0: EXPORT_C TBool Locl::UniCode() sl@0: // sl@0: // Returns ETrue for Unicode Build sl@0: // sl@0: { sl@0: #ifdef _UNICODE sl@0: return ETrue; sl@0: #else sl@0: return EFalse; sl@0: #endif sl@0: } sl@0: