Inheritance diagram for I18n:

Public Member Functions | |
| __bindTextDomain ($domain) | |
| __destruct () | |
| __loadMo ($file, $domain) | |
| __loadPo ($file, $domain) | |
| __pluralGuess ($header, $n) | |
| & | getInstance () |
| translate ($singular, $plural=null, $domain=null, $category=6, $count=null) | |
Public Attributes | |
| $__cache = false | |
| $__categories | |
| $__domains = array() | |
| $__lang = null | |
| $__noLocale = false | |
| $category = 'LC_MESSAGES' | |
| $domain = null | |
| $l10n = null | |
Definition at line 39 of file i18n.php.
| I18n::__destruct | ( | ) |
Object destructor
Write cache file if changes have been made to the $__map or $__paths private
Definition at line 445 of file i18n.php.
References Cache::write().
| I18n::__bindTextDomain | ( | $ | domain | ) |
Binds the given domain to a file in the specified directory.
| string | $domain Domain to bind |
Definition at line 252 of file i18n.php.
References $domain, __loadMo(), __loadPo(), Configure::listObjects(), Set::pushDiff(), Configure::read(), and underscore().
| I18n::__loadMo | ( | $ | file, | |
| $ | domain | |||
| ) |
Loads the binary .mo file for translation and sets the values for this translation in the var I18n::__domains
| resource | $file Binary .mo file to load | |
| string | $domain Domain where to load file in private |
Definition at line 337 of file i18n.php.
References $domain.
Referenced by __bindTextDomain().
| I18n::__loadPo | ( | $ | file, | |
| $ | domain | |||
| ) |
Loads the text .po file for translation and sets the values for this translation in the var I18n::__domains
| resource | $file Text .po file to load | |
| string | $domain Domain to load file in |
Definition at line 377 of file i18n.php.
References $domain.
Referenced by __bindTextDomain().
| I18n::__pluralGuess | ( | $ | header, | |
| $ | n | |||
| ) |
| & I18n::getInstance | ( | ) |
Return a static instance of the I18n class
Definition at line 106 of file i18n.php.
Referenced by TranslateBehavior::_getLocale(), and translate().
| I18n::translate | ( | $ | singular, | |
| $ | plural = null, |
|||
| $ | domain = null, |
|||
| $ | category = 6, |
|||
| $ | count = null | |||
| ) |
Used by the translation functions in basics.php Can also be used like I18n::translate(); but only if the App::import('I18n'); has been used to load the class.
| string | $singular String to translate | |
| string | $plural Plural string (if any) | |
| string | $domain Domain | |
| string | $category Category | |
| integer | $count Count |
Definition at line 126 of file i18n.php.
References $category, $domain, getInstance(), Cache::read(), and Configure::read().
Referenced by __(), __c(), __d(), __dc(), __dcn(), __dn(), and __n().
| I18n::$__categories |
| I18n::$category = 'LC_MESSAGES' |
| I18n::$domain = null |
Definition at line 53 of file i18n.php.
Referenced by __bindTextDomain(), __loadMo(), __loadPo(), and translate().
1.4.7