Zend Framework
1.12
|
Public Member Functions | |
__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. | |
serialize () | |
Serialization Interface. | |
toString () | |
Returns a string representation of the object. | |
__toString () | |
Returns a string representation of the object Alias for toString. | |
setLocale ($locale=null) | |
Sets a new locale. | |
getLanguage () | |
Returns the language part of the locale. | |
getRegion () | |
Returns the region part of the locale if available. | |
equals (Zend_Locale $object) | |
Returns true if both locales are equal. | |
Static Public Member Functions | |
static | getDefault () |
Return the default locale. | |
static | setDefault ($locale, $quality=1) |
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. | |
static | getEnvironment () |
Expects the Systems standard locale. | |
static | getBrowser () |
Return an array of all accepted languages of the client Expects RFC compilant Header !! | |
static | getHttpCharset () |
Return the accepted charset of the client. | |
static | getTranslationList ($path=null, $locale=null, $value=null) |
Returns localized informations as array, supported are several types of informations. | |
static | getLanguageTranslationList ($locale=null) |
Returns an array with the name of all languages translated to the given language. | |
static | getScriptTranslationList ($locale=null) |
Returns an array with the name of all scripts translated to the given language. | |
static | getCountryTranslationList ($locale=null) |
Returns an array with the name of all countries translated to the given language. | |
static | getTerritoryTranslationList ($locale=null) |
Returns an array with the name of all territories translated to the given language All territories contains other countries. | |
static | getTranslation ($value=null, $path=null, $locale=null) |
Returns a localized information string, supported are several types of informations. | |
static | getLanguageTranslation ($value, $locale=null) |
Returns the localized language name. | |
static | getScriptTranslation ($value, $locale=null) |
Returns the localized script name. | |
static | getCountryTranslation ($value, $locale=null) |
Returns the localized country name. | |
static | getTerritoryTranslation ($value, $locale=null) |
Returns the localized territory name All territories contains other countries. | |
static | getQuestion ($locale=null) |
Returns an array with translated yes strings. | |
static | isLocale ($locale, $strict=false, $compatible=true) |
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. | |
static | findLocale ($locale=null) |
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. | |
static | getLocaleToTerritory ($territory) |
Returns the expected locale for a given territory. | |
static | getLocaleList () |
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. | |
static | getCache () |
Returns the set cache. | |
static | setCache (Zend_Cache_Core $cache) |
Sets a cache. | |
static | hasCache () |
Returns true when a cache is set. | |
static | removeCache () |
Removes any set cache. | |
static | clearCache ($tag=null) |
Clears all set cache data. | |
static | disableCache ($flag) |
Disables the set cache. | |
static | getOrder ($order=null) |
Search the locale automatically and return all used locales ordered by quality. | |
Public Attributes | |
const | BROWSER = 'browser' |
Autosearch constants. | |
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) |
__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 |
__toString | ( | ) |
Returns a string representation of the object Alias for toString.
|
static |
Clears all set cache data.
string | $tag | Tag to clear when the default tag name is not used |
|
static |
Disables the set cache.
boolean | $flag | True disables any set cache, default is false |
equals | ( | Zend_Locale | $object | ) |
Returns true if both locales are equal.
Zend_Locale | $object | Locale to check for equality |
|
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 |
|
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
|
static |
Returns the set cache.
|
static |
Returns the localized country name.
string | $value | Name to get detailed information about |
string | Zend_Locale | $locale | (Optional) Locale for country translation |
|
static |
Returns an array with the name of all countries translated to the given language.
string | Zend_Locale | $locale | (Optional) Locale for country translation |
|
static |
Return the default locale.
|
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
|
static |
Return the accepted charset of the client.
getLanguage | ( | ) |
Returns the language part of the locale.
|
static |
Returns the localized language name.
string | $value | Name to get detailed information about |
string | $locale | (Optional) Locale for language translation |
|
static |
Returns an array with the name of all languages translated to the given language.
string | Zend_Locale | $locale | (Optional) Locale for language translation |
|
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.
|
static |
Returns the expected locale for a given territory.
string | $territory | Territory for which the locale is being searched |
|
static |
Search the locale automatically and return all used locales ordered by quality.
Standard Searchorder is Browser, Environment, Default
string | $searchorder | (Optional) Searchorder |
|
static |
Returns an array with translated yes strings.
string | Zend_Locale | $locale | (Optional) Locale for language translation (defaults to $this locale) |
getRegion | ( | ) |
Returns the region part of the locale if available.
|
static |
Returns the localized script name.
string | $value | Name to get detailed information about |
string | $locale | (Optional) locale for script translation |
|
static |
Returns an array with the name of all scripts translated to the given language.
string | Zend_Locale | $locale | (Optional) Locale for script translation |
|
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 |
|
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 |
|
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 |
|
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 |
|
static |
Returns true when a cache is set.
|
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 | (DEPRECATED) Only for internal usage, brakes compatibility mode |
|
static |
Removes any set cache.
serialize | ( | ) |
Serialization Interface.
|
static |
|
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 |
setLocale | ( | $locale = null | ) |
toString | ( | ) |
Returns a string representation of the object.
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
protected |
|
static |
const BROWSER = 'browser' |
Autosearch constants.
const ENVIRONMENT = 'environment' |
const ZFDEFAULT = 'default' |