Public Member Functions | |
__construct ($locale=null) | |
serialize () | |
toString () | |
__toString () | |
setLocale ($locale=null) | |
getLanguage () | |
getRegion () | |
equals (Zend_Locale $object) | |
Static Public Member Functions | |
static | getDefault () |
static | setDefault ($locale, $quality=1) |
static | getEnvironment () |
static | getBrowser () |
static | getHttpCharset () |
static | getTranslationList ($path=null, $locale=null, $value=null) |
static | getLanguageTranslationList ($locale=null) |
static | getScriptTranslationList ($locale=null) |
static | getCountryTranslationList ($locale=null) |
static | getTerritoryTranslationList ($locale=null) |
static | getTranslation ($value=null, $path=null, $locale=null) |
static | getLanguageTranslation ($value, $locale=null) |
static | getScriptTranslation ($value, $locale=null) |
static | getCountryTranslation ($value, $locale=null) |
static | getTerritoryTranslation ($value, $locale=null) |
static | getQuestion ($locale=null) |
static | isLocale ($locale, $strict=false, $compatible=true) |
static | findLocale ($locale=null) |
static | getLocaleList () |
static | getCache () |
static | setCache (Zend_Cache_Core $cache) |
static | hasCache () |
static | removeCache () |
static | clearCache () |
static | disableCache ($flag) |
static | getOrder ($order=null) |
Data Fields | |
const | BROWSER = 'browser' |
const | ENVIRONMENT = 'environment' |
const | ZFDEFAULT = 'default' |
Static Public Attributes | |
static | $compatibilityMode = false |
Protected Attributes | |
$_locale | |
Static Protected Attributes | |
static | $_auto |
static | $_browser |
static | $_environment |
static | $_default = array('en' => true) |
Definition at line 30 of file Locale.php.
__construct | ( | $ | locale = null ) |
Generates a locale object If no locale is given a automatic search is done Then the most probable locale will be automatically set Search order is 1. Given Locale 2. HTTP Client 3. Server Environment 4. Framework Standard
string | Zend_Locale | $locale | (Optional) Locale for parsing input |
Zend_Locale_Exception | When autodetection has been failed |
Definition at line 191 of file Locale.php.
__toString | ( | ) |
Returns a string representation of the object Alias for toString
Definition at line 223 of file Locale.php.
static clearCache | ( | ) | [static] |
static disableCache | ( | $ | flag ) | [static] |
Disables the set cache
boolean | $flag | True disables any set cache, default is false |
Definition at line 911 of file Locale.php.
equals | ( | Zend_Locale $ | object ) |
Returns true if both locales are equal
Zend_Locale | $object | Locale to check for equality |
Definition at line 510 of file Locale.php.
static findLocale | ( | $ | locale = null ) |
[static] |
Finds the proper locale based on the input Checks if it exists, degrades it when necessary Detects registry locale and when all fails tries to detect a automatic locale Returns the found locale as string
string | $locale |
Zend_Locale_Exception | When the given locale is no locale or the autodetection fails |
Definition at line 800 of file Locale.php.
static getBrowser | ( | ) | [static] |
Return an array of all accepted languages of the client Expects RFC compilant Header !!
The notation can be : de,en-UK-US;q=0.5,fr-FR;q=0.2
Definition at line 365 of file Locale.php.
static getCache | ( | ) | [static] |
Returns the set cache
Definition at line 852 of file Locale.php.
static getCountryTranslation | ( | $ | value, |
$ | locale = null |
||
) | [static] |
Returns the localized country name
string | $value | Name to get detailed information about |
string | Zend_Locale | $locale | (Optional) Locale for country translation |
Definition at line 651 of file Locale.php.
static getCountryTranslationList | ( | $ | locale = null ) |
[static] |
Returns an array with the name of all countries translated to the given language
string | Zend_Locale | $locale | (Optional) Locale for country translation |
Definition at line 574 of file Locale.php.
static getDefault | ( | ) | [static] |
Return the default locale
Definition at line 233 of file Locale.php.
static getEnvironment | ( | ) | [static] |
Expects the Systems standard locale
For Windows: f.e.: LC_COLLATE=C;LC_CTYPE=German_Austria.1252;LC_MONETARY=C would be recognised as de_AT
Definition at line 305 of file Locale.php.
static getHttpCharset | ( | ) | [static] |
getLanguage | ( | ) |
static getLanguageTranslation | ( | $ | value, |
$ | locale = null |
||
) | [static] |
Returns the localized language name
string | $value | Name to get detailed information about |
string | $locale | (Optional) Locale for language translation |
Definition at line 623 of file Locale.php.
static getLanguageTranslationList | ( | $ | locale = null ) |
[static] |
Returns an array with the name of all languages translated to the given language
string | Zend_Locale | $locale | (Optional) Locale for language translation |
Definition at line 548 of file Locale.php.
static getLocaleList | ( | ) | [static] |
Returns a list of all known locales where the locale is the key Only real locales are returned, the internal locales 'root', 'auto', 'browser' and 'environment' are suppressed
Definition at line 837 of file Locale.php.
static getOrder | ( | $ | order = null ) |
[static] |
Search the locale automatically and return all used locales ordered by quality
Standard Searchorder is Browser, Environment, Default
string | $searchorder | (Optional) Searchorder |
Definition at line 998 of file Locale.php.
static getQuestion | ( | $ | locale = null ) |
[static] |
Returns an array with translated yes strings
string | Zend_Locale | $locale | (Optional) Locale for language translation (defaults to $this locale) |
Definition at line 678 of file Locale.php.
getRegion | ( | ) |
Returns the region part of the locale if available
Definition at line 461 of file Locale.php.
static getScriptTranslation | ( | $ | value, |
$ | locale = null |
||
) | [static] |
Returns the localized script name
string | $value | Name to get detailed information about |
string | $locale | (Optional) locale for script translation |
Definition at line 637 of file Locale.php.
static getScriptTranslationList | ( | $ | locale = null ) |
[static] |
Returns an array with the name of all scripts translated to the given language
string | Zend_Locale | $locale | (Optional) Locale for script translation |
Definition at line 561 of file Locale.php.
static getTerritoryTranslation | ( | $ | value, |
$ | locale = null |
||
) | [static] |
Returns the localized territory name All territories contains other countries.
string | $value | Name to get detailed information about |
string | Zend_Locale | $locale | (Optional) Locale for territory translation |
Definition at line 666 of file Locale.php.
static getTerritoryTranslationList | ( | $ | locale = null ) |
[static] |
Returns an array with the name of all territories translated to the given language All territories contains other countries.
string | Zend_Locale | $locale | (Optional) Locale for territory translation |
Definition at line 588 of file Locale.php.
static getTranslation | ( | $ | value = null , |
$ | path = null , |
||
$ | locale = null |
||
) | [static] |
Returns a localized information string, supported are several types of informations. For detailed information about the types look into the documentation
string | $value | Name to get detailed information about |
string | $path | (Optional) Type of information to return |
string | Zend_Locale | $locale | (Optional) Locale|Language for which this informations should be returned |
Definition at line 603 of file Locale.php.
static getTranslationList | ( | $ | path = null , |
$ | locale = null , |
||
$ | value = null |
||
) | [static] |
Returns localized informations as array, supported are several types of informations. For detailed information about the types look into the documentation
string | $path | (Optional) Type of information to return |
string | Zend_Locale | $locale | (Optional) Locale|Language for which this informations should be returned |
string | $value | (Optional) Value for detail list |
Definition at line 529 of file Locale.php.
static hasCache | ( | ) | [static] |
static isLocale | ( | $ | locale, |
$ | strict = false , |
||
$ | compatible = true |
||
) | [static] |
Checks if a locale identifier is a real locale or not Examples: "en_XX" refers to "en", which returns true "XX_yy" refers to "root", which returns false
string | Zend_Locale | $locale | Locale to check for |
boolean | $strict | (Optional) If true, no rerouting will be done when checking |
boolean | $compatible | (DEPRECIATED) Only for internal usage, brakes compatibility mode |
Definition at line 750 of file Locale.php.
static removeCache | ( | ) | [static] |
serialize | ( | ) |
static setCache | ( | Zend_Cache_Core $ | cache ) | [static] |
Sets a cache
Zend_Cache_Core | $cache | Cache to set |
Definition at line 866 of file Locale.php.
static setDefault | ( | $ | locale, |
$ | quality = 1 |
||
) | [static] |
Sets a new default locale which will be used when no locale can be detected If provided you can set a quality between 0 and 1 (or 2 and 100) which represents the percent of quality the browser requested within HTTP
string | Zend_Locale | $locale | Locale to set |
float | $quality | The quality to set from 0 to 1 |
Zend_Locale_Exception | When a autolocale was given |
Zend_Locale_Exception | When a unknown locale was given |
Definition at line 265 of file Locale.php.
setLocale | ( | $ | locale = null ) |
Sets a new locale
string | Zend_Locale | $locale | (Optional) New locale to set |
Definition at line 423 of file Locale.php.
toString | ( | ) |
Returns a string representation of the object
Definition at line 212 of file Locale.php.
const BROWSER = 'browser' |
Autosearch constants
Definition at line 124 of file Locale.php.