Overview

Packages

  • currencysymbol
  • MAbout
  • Mage
    • Admin
    • Adminhtml
    • AdminNotification
    • Api
    • Api2
    • Authorizenet
    • Backup
    • Bundle
    • Captcha
    • Catalog
    • CatalogIndex
    • CatalogInventory
    • CatalogRule
    • CatalogSearch
    • Centinel
    • Checkout
    • Cms
    • Compiler
    • Connect
    • Contacts
    • Core
    • Cron
    • CurrencySymbol
    • Customer
    • Dataflow
    • Directory
    • DirtectPost
    • Downloadable
    • Eav
    • GiftMessage
    • GoogleAnalytics
    • GoogleBase
    • GoogleCheckout
    • ImportExport
    • Index
    • Install
    • Log
    • Media
    • Newsletter
    • Oauth
    • Page
    • PageCache
    • Paygate
    • Payment
    • Paypal
    • PaypalUk
    • Persistent
    • Poll
    • ProductAlert
    • Rating
    • Reports
    • Review
    • Rss
    • Rule
    • Sales
    • SalesRule
    • Sedfriend
    • Sendfriend
    • Shipping
    • Sitemap
    • Tag
    • Tax
    • Usa
    • Weee
    • Widget
    • Wishlist
    • XmlConnect
  • None
  • Phoenix
    • Moneybookers
  • PHP
  • Zend
    • Date
    • Mime
    • XmlRpc

Classes

  • Mage
  • Mage_Adminhtml_Block_Html_Date
  • Mage_Adminhtml_Block_Html_Select
  • Mage_Api_Model_Wsdl_Config_Element
  • Mage_Captcha_Adminhtml_RefreshController
  • Mage_Captcha_RefreshController
  • Mage_Core_AjaxController
  • Mage_Core_Block_Abstract
  • Mage_Core_Block_Flush
  • Mage_Core_Block_Html_Calendar
  • Mage_Core_Block_Html_Date
  • Mage_Core_Block_Html_Link
  • Mage_Core_Block_Html_Select
  • Mage_Core_Block_Messages
  • Mage_Core_Block_Profiler
  • Mage_Core_Block_Store_Switcher
  • Mage_Core_Block_Template
  • Mage_Core_Block_Template_Facade
  • Mage_Core_Block_Template_Smarty
  • Mage_Core_Block_Template_Zend
  • Mage_Core_Block_Text
  • Mage_Core_Block_Text_List
  • Mage_Core_Block_Text_List_Item
  • Mage_Core_Block_Text_List_Link
  • Mage_Core_Block_Text_Tag
  • Mage_Core_Block_Text_Tag_Css
  • Mage_Core_Block_Text_Tag_Css_Admin
  • Mage_Core_Block_Text_Tag_Debug
  • Mage_Core_Block_Text_Tag_Js
  • Mage_Core_Block_Text_Tag_Meta
  • Mage_Core_Controller_Front_Action
  • Mage_Core_Controller_Front_Router
  • Mage_Core_Controller_Request_Http
  • Mage_Core_Controller_Response_Http
  • Mage_Core_Controller_Varien_Action
  • Mage_Core_Controller_Varien_Front
  • Mage_Core_Controller_Varien_Router_Abstract
  • Mage_Core_Controller_Varien_Router_Admin
  • Mage_Core_Controller_Varien_Router_Default
  • Mage_Core_Controller_Varien_Router_Standard
  • Mage_Core_Helper_Abstract
  • Mage_Core_Helper_Cookie
  • Mage_Core_Helper_Data
  • Mage_Core_Helper_File_Storage
  • Mage_Core_Helper_File_Storage_Database
  • Mage_Core_Helper_Hint
  • Mage_Core_Helper_Http
  • Mage_Core_Helper_Js
  • Mage_Core_Helper_String
  • Mage_Core_Helper_Translate
  • Mage_Core_Helper_Url
  • Mage_Core_Helper_Url_Rewrite
  • Mage_Core_IndexController
  • Mage_Core_Model_Abstract
  • Mage_Core_Model_App
  • Mage_Core_Model_App_Area
  • Mage_Core_Model_App_Emulation
  • Mage_Core_Model_Cache
  • Mage_Core_Model_Calculator
  • Mage_Core_Model_Config
  • Mage_Core_Model_Config_Base
  • Mage_Core_Model_Config_Data
  • Mage_Core_Model_Config_Element
  • Mage_Core_Model_Config_Options
  • Mage_Core_Model_Config_System
  • Mage_Core_Model_Cookie
  • Mage_Core_Model_Date
  • Mage_Core_Model_Design
  • Mage_Core_Model_Design_Package
  • Mage_Core_Model_Design_Source_Design
  • Mage_Core_Model_Email
  • Mage_Core_Model_Email_Info
  • Mage_Core_Model_Email_Template
  • Mage_Core_Model_Email_Template_Filter
  • Mage_Core_Model_Email_Template_Mailer
  • Mage_Core_Model_Email_Transport
  • Mage_Core_Model_Encryption
  • Mage_Core_Model_File_Storage
  • Mage_Core_Model_File_Storage_Abstract
  • Mage_Core_Model_File_Storage_Database
  • Mage_Core_Model_File_Storage_Database_Abstract
  • Mage_Core_Model_File_Storage_Directory_Database
  • Mage_Core_Model_File_Storage_File
  • Mage_Core_Model_File_Storage_Flag
  • Mage_Core_Model_File_Uploader
  • Mage_Core_Model_File_Validator_AvailablePath
  • Mage_Core_Model_File_Validator_NotProtectedExtension
  • Mage_Core_Model_Flag
  • Mage_Core_Model_Input_Filter
  • Mage_Core_Model_Input_Filter_MaliciousCode
  • Mage_Core_Model_Language
  • Mage_Core_Model_Layout
  • Mage_Core_Model_Layout_Data
  • Mage_Core_Model_Layout_Element
  • Mage_Core_Model_Layout_Update
  • Mage_Core_Model_Locale
  • Mage_Core_Model_Locale_Config
  • Mage_Core_Model_Log_Adapter
  • Mage_Core_Model_Magento_Api
  • Mage_Core_Model_Magento_Api_V2
  • Mage_Core_Model_Message
  • Mage_Core_Model_Message_Abstract
  • Mage_Core_Model_Message_Collection
  • Mage_Core_Model_Message_Error
  • Mage_Core_Model_Message_Notice
  • Mage_Core_Model_Message_Success
  • Mage_Core_Model_Message_Warning
  • Mage_Core_Model_Mysql4_Abstract
  • Mage_Core_Model_Mysql4_Cache
  • Mage_Core_Model_Mysql4_Collection_Abstract
  • Mage_Core_Model_Mysql4_Config
  • Mage_Core_Model_Mysql4_Config_Data
  • Mage_Core_Model_Mysql4_Config_Data_Collection
  • Mage_Core_Model_Mysql4_Design
  • Mage_Core_Model_Mysql4_Design_Collection
  • Mage_Core_Model_Mysql4_Design_Package_Collection
  • Mage_Core_Model_Mysql4_Design_Theme
  • Mage_Core_Model_Mysql4_Email_Template
  • Mage_Core_Model_Mysql4_Email_Template_Collection
  • Mage_Core_Model_Mysql4_File_Storage_Abstract
  • Mage_Core_Model_Mysql4_File_Storage_Database
  • Mage_Core_Model_Mysql4_File_Storage_Directory_Database
  • Mage_Core_Model_Mysql4_File_Storage_File
  • Mage_Core_Model_Mysql4_Flag
  • Mage_Core_Model_Mysql4_Language
  • Mage_Core_Model_Mysql4_Language_Collection
  • Mage_Core_Model_Mysql4_Layout
  • Mage_Core_Model_Mysql4_Resource
  • Mage_Core_Model_Mysql4_Session
  • Mage_Core_Model_Mysql4_Store
  • Mage_Core_Model_Mysql4_Store_Collection
  • Mage_Core_Model_Mysql4_Store_Group
  • Mage_Core_Model_Mysql4_Store_Group_Collection
  • Mage_Core_Model_Mysql4_Translate
  • Mage_Core_Model_Mysql4_Translate_String
  • Mage_Core_Model_Mysql4_Url_Rewrite
  • Mage_Core_Model_Mysql4_Url_Rewrite_Collection
  • Mage_Core_Model_Mysql4_Variable
  • Mage_Core_Model_Mysql4_Variable_Collection
  • Mage_Core_Model_Mysql4_Website
  • Mage_Core_Model_Mysql4_Website_Collection
  • Mage_Core_Model_Observer
  • Mage_Core_Model_Resource
  • Mage_Core_Model_Resource_Abstract
  • Mage_Core_Model_Resource_Cache
  • Mage_Core_Model_Resource_Config
  • Mage_Core_Model_Resource_Config_Data
  • Mage_Core_Model_Resource_Config_Data_Collection
  • Mage_Core_Model_Resource_Db_Abstract
  • Mage_Core_Model_Resource_Db_Collection_Abstract
  • Mage_Core_Model_Resource_Design
  • Mage_Core_Model_Resource_Design_Collection
  • Mage_Core_Model_Resource_Design_Package_Collection
  • Mage_Core_Model_Resource_Email_Template
  • Mage_Core_Model_Resource_Email_Template_Collection
  • Mage_Core_Model_Resource_Entity_Abstract
  • Mage_Core_Model_Resource_Entity_Table
  • Mage_Core_Model_Resource_File_Storage_Abstract
  • Mage_Core_Model_Resource_File_Storage_Database
  • Mage_Core_Model_Resource_File_Storage_Directory_Database
  • Mage_Core_Model_Resource_File_Storage_File
  • Mage_Core_Model_Resource_Flag
  • Mage_Core_Model_Resource_Helper_Abstract
  • Mage_Core_Model_Resource_Helper_Mysql4
  • Mage_Core_Model_Resource_Iterator
  • Mage_Core_Model_Resource_Language
  • Mage_Core_Model_Resource_Language_Collection
  • Mage_Core_Model_Resource_Layout
  • Mage_Core_Model_Resource_Resource
  • Mage_Core_Model_Resource_Session
  • Mage_Core_Model_Resource_Setup
  • Mage_Core_Model_Resource_Setup_Query_Modifier
  • Mage_Core_Model_Resource_Store
  • Mage_Core_Model_Resource_Store_Collection
  • Mage_Core_Model_Resource_Store_Group
  • Mage_Core_Model_Resource_Store_Group_Collection
  • Mage_Core_Model_Resource_Transaction
  • Mage_Core_Model_Resource_Translate
  • Mage_Core_Model_Resource_Translate_String
  • Mage_Core_Model_Resource_Type_Abstract
  • Mage_Core_Model_Resource_Type_Db
  • Mage_Core_Model_Resource_Type_Db_Mysqli
  • Mage_Core_Model_Resource_Type_Db_Mysqli_Setup
  • Mage_Core_Model_Resource_Type_Db_Pdo_Mysql
  • Mage_Core_Model_Resource_Url_Rewrite
  • Mage_Core_Model_Resource_Url_Rewrite_Collection
  • Mage_Core_Model_Resource_Variable
  • Mage_Core_Model_Resource_Variable_Collection
  • Mage_Core_Model_Resource_Website
  • Mage_Core_Model_Resource_Website_Collection
  • Mage_Core_Model_Session
  • Mage_Core_Model_Session_Abstract
  • Mage_Core_Model_Session_Abstract_Varien
  • Mage_Core_Model_Session_Abstract_Zend
  • Mage_Core_Model_Source_Email_Variables
  • Mage_Core_Model_Store
  • Mage_Core_Model_Store_Api
  • Mage_Core_Model_Store_Api_V2
  • Mage_Core_Model_Store_Group
  • Mage_Core_Model_Template
  • Mage_Core_Model_Translate
  • Mage_Core_Model_Translate_Expr
  • Mage_Core_Model_Translate_Inline
  • Mage_Core_Model_Translate_String
  • Mage_Core_Model_Url
  • Mage_Core_Model_Url_Rewrite
  • Mage_Core_Model_Url_Validator
  • Mage_Core_Model_Variable
  • Mage_Core_Model_Variable_Config
  • Mage_Core_Model_Variable_Observer
  • Mage_Core_Model_Website
  • Mage_Page_Block_Switch
  • Mage_Page_Block_Template_Container
  • Mage_Page_Block_Template_Links
  • Mage_Page_Block_Template_Links_Block
  • Mage_Sales_Model_Quote_Address_Total_Collector

Exceptions

  • Mage_Core_Controller_Varien_Exception
  • Mage_Core_Exception
  • Mage_Core_Model_Session_Exception
  • Mage_Core_Model_Store_Exception

Functions

  • destruct
  • is_dir_writeable
  • is_empty_date
  • mageCoreErrorHandler
  • mageDebugBacktrace
  • mageDelTree
  • mageFindClassFile
  • mageParseCsv
  • mageSendErrorFooter
  • mageSendErrorHeader
  • mageUndoMagicQuotes
  • now
  • sys_get_temp_dir
  • uc_words
  • Overview
  • Package
  • Class
  • Tree

Class Mage_Core_Model_Locale

Locale model

Package: Mage\Core
Copyright: Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
License: Open Software License (OSL 3.0)
Author: Magento Core Team <core@magentocommerce.com>
Located at code/core/Mage/Core/Model/Locale.php
Methods summary
public
# __construct( mixed $locale = null )
public Mage_Core_Model_Locale
# setDefaultLocale( string $locale )

Set default locale code

Set default locale code

Parameters

$locale
string
$locale

Returns

Mage_Core_Model_Locale
public string
# getDefaultLocale( )

REtrieve default locale code

REtrieve default locale code

Returns

string
public Mage_Core_Model_Locale
# setLocale( string $locale = null )

Set locale

Set locale

Parameters

$locale
string
$locale

Returns

Mage_Core_Model_Locale
public string
# getTimezone( )

Retrieve timezone code

Retrieve timezone code

Returns

string
public string
# getCurrency( )

Retrieve currency code

Retrieve currency code

Returns

string
public Zend_Locale
# getLocale( )

Retrieve locale object

Retrieve locale object

Returns

Zend_Locale
public string
# getLocaleCode( )

Retrieve locale code

Retrieve locale code

Returns

string
public Mage_Core_Model_Locale
# setLocaleCode( string $code )

Specify current locale code

Specify current locale code

Parameters

$code
string
$code

Returns

Mage_Core_Model_Locale
public array
# getOptionLocales( )

Get options array for locale dropdown in currunt locale

Get options array for locale dropdown in currunt locale

Returns

array
public array
# getTranslatedOptionLocales( )

Get translated to original locale options array for locale dropdown

Get translated to original locale options array for locale dropdown

Returns

array
protected array
# _getOptionLocales( boolean $translatedName = false )

Get options array for locale dropdown

Get options array for locale dropdown

Parameters

$translatedName
boolean
$translatedName translation flag

Returns

array
public array
# getOptionTimezones( )

Retrieve timezone option list

Retrieve timezone option list

Returns

array
public array
# getOptionWeekdays( )

Retrieve days of week option list

Retrieve days of week option list

Returns

array
public array
# getOptionCountries( )

Retrieve country option list

Retrieve country option list

Returns

array
public unknown
# getOptionCurrencies( )

Retrieve currency option list

Retrieve currency option list

Returns

unknown
public unknown
# getOptionAllCurrencies( )

Retrieve all currency option list

Retrieve all currency option list

Returns

unknown
protected
# _sortOptionArray( mixed $option )
public array
# getAllowLocales( )

Retrieve array of allowed locales

Retrieve array of allowed locales

Returns

array
public unknown
# getAllowCurrencies( )

Retrieve array of allowed currencies

Retrieve array of allowed currencies

Returns

unknown
public string
# getDateFormat( string $type = null )

Retrieve ISO date format

Retrieve ISO date format

Parameters

$type
string
$type

Returns

string
public string
# getDateFormatWithLongYear( )

Retrieve short date format with 4-digit year

Retrieve short date format with 4-digit year

Returns

string
public string
# getTimeFormat( string $type = null )

Retrieve ISO time format

Retrieve ISO time format

Parameters

$type
string
$type

Returns

string
public string
# getDateTimeFormat( string $type )

Retrieve ISO datetime format

Retrieve ISO datetime format

Parameters

$type
string
$type

Returns

string
public string
# getDateStrFormat( string $type )

Retrieve date format by strftime function

Retrieve date format by strftime function

Parameters

$type
string
$type

Returns

string
public string
# getTimeStrFormat( string $type )

Retrieve time format by strftime function

Retrieve time format by strftime function

Parameters

$type
string
$type

Returns

string
public Zend_Date
# date( mixed $date = null, string $part = null, string|Zend_Locale $locale = null, boolean $useTimezone = true )

Create Zend_Date object for current locale

Create Zend_Date object for current locale

Parameters

$date
mixed
$date
$part
string
$part
$locale
string|Zend_Locale
$locale
$useTimezone
boolean
$useTimezone

Returns

Zend_Date
public Zend_Date
# storeDate( mixed $store = null, string|integer|Zend_Date|array|null $date = null, boolean $includeTime = false )

Create Zend_Date object with date converted to store timezone and store Locale

Create Zend_Date object with date converted to store timezone and store Locale

Parameters

$store
mixed
$store Information about store
$date
string|integer|Zend_Date|array|null
$date date in UTC
$includeTime
boolean
$includeTime flag for including time to date

Returns

Zend_Date
public Zend_Date
# utcDate( mixed $store = null, string|integer|Zend_Date|array|null $date, boolean $includeTime = false, null|string $format = null )

Create Zend_Date object with date converted from store's timezone to UTC time zone. Date can be passed in format of store's locale or in format which was passed as parameter.

Create Zend_Date object with date converted from store's timezone to UTC time zone. Date can be passed in format of store's locale or in format which was passed as parameter.

Parameters

$store
mixed
$store Information about store
$date
string|integer|Zend_Date|array|null
$date date in store's timezone
$includeTime
boolean
$includeTime flag for including time to date
$format
null|string
$format

Returns

Zend_Date
public integer
# storeTimeStamp( mixed $store = null )

Get store timestamp Timstamp will be builded with store timezone settings

Get store timestamp Timstamp will be builded with store timezone settings

Parameters

$store
mixed
$store

Returns

integer
public Zend_Currency
# currency( string $currency )

Create Zend_Currency object for current locale

Create Zend_Currency object for current locale

Parameters

$currency
string
$currency

Returns

Zend_Currency
public float|null
# getNumber( string|float|integer $value )

Returns the first found number from an string Parsing depends on given locale (grouping and decimal)

Returns the first found number from an string Parsing depends on given locale (grouping and decimal)

Examples for input: ' 2345.4356,1234' = 23455456.1234 '+23,3452.123' = 233452.123 ' 12343 ' = 12343 '-9456km' = -9456 '0' = 0 '2 054,10' = 2054.1 '2'054.52' = 2054.52 '2,46 GB' = 2.46

Parameters

$value
string|float|integer
$value

Returns

float|null
public array
# getJsPriceFormat( )

Functions returns array with price formatting info for js function formatCurrency in js/varien/js.js

Functions returns array with price formatting info for js function formatCurrency in js/varien/js.js

Returns

array
public
# emulate( integer $storeId )

Push current locale to stack and replace with locale from specified store Event is not dispatched.

Push current locale to stack and replace with locale from specified store Event is not dispatched.

Parameters

$storeId
integer
$storeId
public
# revert( )

Get last locale, used before last emulation

Get last locale, used before last emulation

public array
# getTranslationList( string $path = null, string $value = null )

Returns localized informations as array, supported are several types of informations. For detailed information about the types look into the documentation

Returns localized informations as array, supported are several types of informations. For detailed information about the types look into the documentation

Parameters

$path
string
$path (Optional) Type of information to return
$value
string
$value (Optional) Value for detail list

Returns

array
Array with the wished information in the given language
public string|false
# getTranslation( string $value = null, string $path = null )

Returns a localized information string, supported are several types of informations. For detailed information about the types look into the documentation

Returns a localized information string, supported are several types of informations. For detailed information about the types look into the documentation

Parameters

$value
string
$value Name to get detailed information about
$path
string
$path (Optional) Type of information to return

Returns

string|false
The wished information in the given language
public array
# getCountryTranslation( string $value )

Returns the localized country name

Returns the localized country name

Parameters

$value
string
$value Name to get detailed information about

Returns

array
public array
# getCountryTranslationList( )

Returns an array with the name of all countries translated to the given language

Returns an array with the name of all countries translated to the given language

Returns

array
public boolean
# isStoreDateInInterval( integer|string|Mage_Core_Model_Store $store, string|null $dateFrom = null, string|null $dateTo = null )

Checks if current date of the given store (in the store timezone) is within the range

Checks if current date of the given store (in the store timezone) is within the range

Parameters

$store
integer|string|Mage_Core_Model_Store
$store
$dateFrom
string|null
$dateFrom
$dateTo
string|null
$dateTo

Returns

boolean
Constants summary
string DEFAULT_LOCALE 'en_US'
#

Default locale name

Default locale name

string DEFAULT_TIMEZONE 'UTC'
#
string DEFAULT_CURRENCY 'USD'
#
string XML_PATH_DEFAULT_LOCALE 'general/locale/code'
#

XML path constants

XML path constants

string XML_PATH_DEFAULT_TIMEZONE 'general/locale/timezone'
#
string XML_PATH_ALLOW_CODES 'global/locale/allow/codes'
#
string XML_PATH_ALLOW_CURRENCIES 'global/locale/allow/currencies'
#
string XML_PATH_ALLOW_CURRENCIES_INSTALLED 'system/currency/installed'
#
string FORMAT_TYPE_FULL 'full'
#

Date and time format codes

Date and time format codes

string FORMAT_TYPE_LONG 'long'
#
string FORMAT_TYPE_MEDIUM 'medium'
#
string FORMAT_TYPE_SHORT 'short'
#
Properties summary
protected string $_defaultLocale
#

Default locale code

Default locale code

protected Zend_Locale $_locale
#

Locale object

Locale object

protected string $_localeCode
#

Locale code

Locale code

protected array $_emulatedLocales array()
#

Emulated locales stack

Emulated locales stack

protected static array $_currencyCache array()
#
Magento 1.7.0.2 API documentation generated by ApiGen 2.8.0