
Public Member Functions | |
| _cacheMiss (&$cache, $id) | |
| & | _getCache ($locale) |
| getFilename () | |
| isValid () | |
| & | load ($filename) |
| LocaleFile ($locale, $filename) | |
| testLocale (&$referenceLocaleFile) | |
| translate ($key, $params=array(), $locale=null) | |
Definition at line 18 of file LocaleFile.inc.php.
| LocaleFile._cacheMiss | ( | &$ | cache, | |
| $ | id | |||
| ) |
Register a cache miss.
Definition at line 66 of file LocaleFile.inc.php.
References Config.getVar(), and load().
Referenced by translate().
| & LocaleFile._getCache | ( | $ | locale | ) |
Get the cache object for this locale file.
Definition at line 41 of file LocaleFile.inc.php.
References load().
Referenced by translate().
| LocaleFile.getFilename | ( | ) |
Get the filename for this locale file.
Definition at line 80 of file LocaleFile.inc.php.
| LocaleFile.isValid | ( | ) |
Check if a locale is valid.
| $locale | string |
Definition at line 149 of file LocaleFile.inc.php.
Referenced by testLocale().
| & LocaleFile.load | ( | $ | filename | ) |
Static method: Load a locale array from a file. Not cached!
| $filename | string Filename to locale XML to load | |
| array |
Definition at line 127 of file LocaleFile.inc.php.
Referenced by _cacheMiss(), _getCache(), genTestLocale.execute(), and testLocale().
| LocaleFile.LocaleFile | ( | $ | locale, | |
| $ | filename | |||
| ) |
Constructor.
| $locale | string Key for this locale file | |
| $filename | string Filename to this locale file |
Definition at line 33 of file LocaleFile.inc.php.
| LocaleFile.testLocale | ( | &$ | referenceLocaleFile | ) |
Test a locale file against the given reference locale file and return an array of errorType => array(errors).
| $referenceLocaleFile | object |
Definition at line 159 of file LocaleFile.inc.php.
References Locale.checkLengths(), Locale.getParameterNames(), isValid(), and load().
| LocaleFile.translate | ( | $ | key, | |
| $ | params = array(), |
|||
| $ | locale = null | |||
| ) |
Translate a string using the selected locale. Substitution works by replacing tokens like "{$foo}" with the value of the parameter named "foo" (if supplied).
| $key | string $params array named substitution parameters $locale string the locale to use |
Definition at line 93 of file LocaleFile.inc.php.
References _cacheMiss(), and _getCache().
1.5.6