Class Mage_Core_Model_Translate

Description

Translate model

Located in /Core/Model/Translate.php (line 32)


	
			
Class Constant Summary
Variable Summary
string $_cacheId
boolean $_canUseInline
array $_config
array $_data
array $_dataScope
string $_locale
Zend_Translate_Adapter $_translate
mixed $_useCache
Method Summary
Mage_Core_Model_Translate __construct ()
string getCacheId ()
mixed getConfig (string $key)
array getData ()
string getLocale ()
unknown getResource ()
string getTemplateFile (string $file, string $type, [string $localeCode = null])
Zend_Translate_Adapter getTranslate ()
Mage_Core_Model_Translate init (string $area, [ $forceReload = false])
void setLocale ( $locale)
string translate (array $args)
Mage_Core_Model_Translate _addData (array $data, string $scope, [ $forceReload = false])
bool _canUseCache ()
array _getFileData (string $file)
string _getModuleFilePath (string $module,  $fileName)
string _getTranslatedString (string $text, string $code)
array _loadCache (string $area)
Mage_Core_Model_Translate _loadDbTranslation ([ $forceReload = false])
Mage_Core_Model_Translate _loadModuleTranslation (string $moduleName, string $files, [ $forceReload = false])
void _prepareDataString ( $string)
Variables
string $_cacheId (line 72)

Cache identifier

  • access: protected
boolean $_canUseInline = true (line 100)

Configuration flag to local enable inline translations

  • access: protected
array $_config (line 63)

Translator configuration array

  • access: protected
array $_data = array() (line 79)

Translation data

  • access: protected
array $_dataScope (line 86)

Translation data for data scope (per module)

  • access: protected
string $_locale (line 49)

Locale name

  • access: protected
Zend_Translate_Adapter $_translate (line 56)

Translation object

  • access: protected
boolean $_translateInline (line 93)

Configuration flag to enable inline translations

  • access: protected
mixed $_useCache = true (line 65)
  • access: protected
Methods
Constructor __construct (line 102)
  • access: public
Mage_Core_Model_Translate __construct ()
getCacheId (line 487)

Retrieve cache identifier

  • access: public
string getCacheId ()
getConfig (line 194)

Retrieve config value by key

  • access: public
mixed getConfig (string $key)
  • string $key
getData (line 325)

Retrieve translation data

  • access: public
array getData ()
getLocale (line 339)

Retrieve locale

  • access: public
string getLocale ()
getModulesConfig (line 151)

Retrieve modules configuration by translation

  • access: public
Mage_Core_Model_Config_Element getModulesConfig ()
getResource (line 358)

Retrieve DB resource model

  • access: public
unknown getResource ()
getTemplateFile (line 455)

Retrive translated template file

  • access: public
string getTemplateFile (string $file, string $type, [string $localeCode = null])
  • string $file
  • string $type
  • string $localeCode
getTranslate (line 368)

Retrieve translation object

  • access: public
Zend_Translate_Adapter getTranslate ()
getTranslateInline (line 442)

Retrieve active translate mode

  • access: public
bool getTranslateInline ()
init (line 112)

Initialization translation data

  • access: public
Mage_Core_Model_Translate init (string $area, [ $forceReload = false])
  • string $area
  • $forceReload
setConfig (line 170)

Initialize configuration

  • access: public
Mage_Core_Model_Translate setConfig (array $config)
  • array $config
setLocale (line 347)
  • access: public
void setLocale ( $locale)
  • $locale
setTranslateInline (line 431)

Set Translate inline mode

  • access: public
Mage_Core_Model_Translate setTranslateInline ([bool $flag = null])
  • bool $flag
translate (line 382)

Translate

  • access: public
string translate (array $args)
  • array $args
_addData (line 225)

Adding translation data

  • access: protected
Mage_Core_Model_Translate _addData (array $data, string $scope, [ $forceReload = false])
  • array $data
  • string $scope
  • $forceReload
_canUseCache (line 546)

Check cache usage availability

  • access: protected
bool _canUseCache ()
_getFileData (line 309)

Retrieve data from file

  • access: protected
array _getFileData (string $file)
  • string $file
_getModuleFilePath (line 295)

Retrieve translation file for module

  • access: protected
string _getModuleFilePath (string $module,  $fileName)
  • string $module
  • $fileName
_getTranslatedString (line 558)

Return translated string from text.

  • access: protected
string _getTranslatedString (string $text, string $code)
  • string $text
  • string $code
_loadCache (line 516)

Loading data cache

  • return: | false
  • access: protected
array _loadCache (string $area)
  • string $area
_loadDbTranslation (line 282)

Loading current store translation from DB

  • access: protected
Mage_Core_Model_Translate _loadDbTranslation ([ $forceReload = false])
  • $forceReload
_loadModuleTranslation (line 209)

Loading data from module translation files

  • access: protected
Mage_Core_Model_Translate _loadModuleTranslation (string $moduleName, string $files, [ $forceReload = false])
  • string $moduleName
  • string $files
  • $forceReload
_loadThemeTranslation (line 270)

Loading current theme translation

  • access: protected
Mage_Core_Model_Translate _loadThemeTranslation ([ $forceReload = false])
  • $forceReload
_prepareDataString (line 260)
  • access: protected
void _prepareDataString ( $string)
  • $string
_saveCache (line 532)

Saving data cache

  • access: protected
Mage_Core_Model_Translate _saveCache (string $area)
  • string $area
Class Constants
CACHE_TAG = 'translate' (line 36)
CONFIG_KEY_AREA = 'area' (line 38)
CONFIG_KEY_DESIGN_PACKAGE = 'package' (line 41)
CONFIG_KEY_DESIGN_THEME = 'theme' (line 42)
CONFIG_KEY_LOCALE = 'locale' (line 39)
CONFIG_KEY_STORE = 'store' (line 40)
CSV_SEPARATOR = ',' (line 34)
SCOPE_SEPARATOR = '::' (line 35)

Documentation generated on Fri, 11 Feb 2011 17:15:09 +0200 by phpDocumentor 1.4.3