Clears all set cache data
static void
clearCache
()
Disables the set cache
static void
disableCache
(boolean $flag)
-
boolean
$flag: True disables any set cache, default is false
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 string
findLocale
([string $locale = null])
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 array
getBrowser
()
Returns the localized country name
static
array
getCountryTranslation
(
string $value, [
string|Zend_Locale $locale =
null])
-
string
$value: Name to get detailed information about
-
string|Zend_Locale
$locale: (Optional) Locale for country translation
Returns an array with the name of all countries translated to the given language
static
array
getCountryTranslationList
([
string|Zend_Locale $locale =
null])
-
string|Zend_Locale
$locale: (Optional) Locale for country translation
Return the default locale
static array
getDefault
()
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 array
getEnvironment
()
Return the accepted charset of the client
static string
getHttpCharset
()
Returns the localized language name
static array
getLanguageTranslation
(string $value, [string $locale = null])
-
string
$value: Name to get detailed information about
-
string
$locale: (Optional) Locale for language translation
Returns an array with the name of all languages translated to the given language
static
array
getLanguageTranslationList
([
string|Zend_Locale $locale =
null])
-
string|Zend_Locale
$locale: (Optional) Locale for language translation
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 array
getLocaleList
()
Returns the expected locale for a given territory
static string|null
getLocaleToTerritory
(string $territory)
-
string
$territory: Territory for which the locale is being searched
Search the locale automatically and return all used locales ordered by quality
Standard Searchorder is Browser, Environment, Default
static array
getOrder
([ $order = null], string $searchorder)
-
string
$searchorder: (Optional) Searchorder
-
$order
Returns an array with translated yes strings
static
array
getQuestion
([
string|Zend_Locale $locale =
null])
-
string|Zend_Locale
$locale: (Optional) Locale for language translation (defaults to $this locale)
Returns the localized script name
static array
getScriptTranslation
(string $value, [string $locale = null])
-
string
$value: Name to get detailed information about
-
string
$locale: (Optional) locale for script translation
Returns an array with the name of all scripts translated to the given language
static
array
getScriptTranslationList
([
string|Zend_Locale $locale =
null])
-
string|Zend_Locale
$locale: (Optional) Locale for script translation
Returns the localized territory name All territories contains other countries.
static
array
getTerritoryTranslation
(
string $value, [
string|Zend_Locale $locale =
null])
-
string
$value: Name to get detailed information about
-
string|Zend_Locale
$locale: (Optional) Locale for territory translation
Returns an array with the name of all territories translated to the given language All territories contains other countries.
static
array
getTerritoryTranslationList
([
string|Zend_Locale $locale =
null])
-
string|Zend_Locale
$locale: (Optional) Locale for territory translation
Returns a localized information string, supported are several types of informations.
For detailed information about the types look into the documentation
static
string|false
getTranslation
([
string $value =
null], [
string $path =
null], [
string|Zend_Locale $locale =
null])
-
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
Returns localized informations as array, supported are several types of informations.
For detailed information about the types look into the documentation
static
array
getTranslationList
([
string $path =
null], [
string|Zend_Locale $locale =
null], [
string $value =
null])
-
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
Returns true when a cache is set
static boolean
hasCache
()
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
boolean
isLocale
(
string|Zend_Locale $locale, [
boolean $strict =
false], [
boolean $compatible =
true])
-
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
Removes any set cache
static void
removeCache
()
Sets a cache
static void
setCache
( $cache)
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
void
setDefault
(
string|Zend_Locale $locale, [
float $quality =
1])
-
string|Zend_Locale
$locale: Locale to set
-
float
$quality: The quality to set from 0 to 1
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
- Given Locale
- HTTP Client
- Server Environment
- Framework Standard
Zend_Locale
__construct
([
string|Zend_Locale $locale =
null])
-
string|Zend_Locale
$locale: (Optional) Locale for parsing input
Returns true if both locales are equal
Returns the language part of the locale
string
getLanguage
()
Returns the region part of the locale if available
string|false
getRegion
()
Serialization Interface
string
serialize
()
Sets a new locale
-
string|Zend_Locale
$locale: (Optional) New locale to set
Returns a string representation of the object
string
toString
()
Returns a string representation of the object Alias for toString
string
__toString
()