-
Gets the data by unserializing the ICU data from disk.
The data files are cached in a static variable inside
this function.
returns ICU data
-
Gets the default directory for the ICU data.
The default is the "data" directory for this class.
returns directory containing the ICU data.
-
Gets the filename extension for ICU data. Default is ".dat".
returns filename extension for ICU data.
-
Finds the specific ICU data information from the data.
The path to the specific ICU data is separated with a slash "/".
E.g. To find the default calendar used by the culture, the path
"calendar/default" will return the corresponding default calendar.
Use merge=true to return the ICU including the parent culture.
E.g. The currency data for a variant, say "en_AU" contains one
entry, the currency for AUD, the other currency data are stored
in the "en" data file. Thus to retrieve all the data regarding
currency for "en_AU", you need to use findInfo("Currencies,true);.
returns the specific ICU data.
-
(string) getCalendar ()
Browse code
Gets the default calendar used by the culture, e.g. "gregorian".
returns the default calendar.
-
(array) getCountries ()
Browse code
Gets a list of countries in the language of the localized version.
returns a list of localized country names.
-
(array) getCultures ()
Browse code
Gets the list of supported cultures filtered by the specified
culture type. This is an EXPENSIVE function, it needs to traverse
a list of ICU files in the data directory.
This function can be called statically.
returns list of culture information available.
-
(array) getCurrencies ()
Browse code
Gets a list of currencies in the language of the localized version.
returns a list of localized currencies.
-
(sfDateTimeFormatInfo) getDateTimeFormat ()
Browse code
Gets the sfDateTimeFormatInfo that defines the culturally appropriate
format of displaying dates and times.
returns date time format information for the culture.
-
(array) getEnglishName ()
Browse code
Gets the culture name in English.
Returns array('Language','Country');
'Country' is omitted if the culture is neutral.
returns array with language and country as elements.
-
(sfCultureInfo) getInstance ()
Browse code
Gets the sfCultureInfo that for this culture string.
returns Invariant culture info is "en"
-
(sfCultureInfo) getInvariantCulture ()
Browse code
Gets the sfCultureInfo that is culture-independent (invariant).
Any changes to the invariant culture affects all other
instances of the invariant culture.
The invariant culture is assumed to be "en";
returns invariant culture info is "en".
-
(boolean) getIsNeutralCulture ()
Browse code
Gets a value indicating whether the current sfCultureInfo
represents a neutral culture. Returns true if the culture
only contains two characters.
returns true if culture is neutral, false otherwise.
-
(array) getLanguages ()
Browse code
Gets a list of languages in the language of the localized version.
returns list of localized language names.
-
Gets the culture name in the format
"_(country/regioncode2)".
returns culture name.
-
(array) getNativeName ()
Browse code
Gets the culture name in the language that the culture is set
to display. Returns array('Language','Country');
'Country' is omitted if the culture is neutral.
returns array with language and country as elements, localized.
-
(sfNumberFormatInfo) getNumberFormat ()
Browse code
Gets the sfNumberFormatInfo that defines the culturally appropriate
format of displaying numbers, currency, and percentage.
returns the number format info for current culture.
-
(sfCultureInfo) getParent ()
Browse code
Gets the sfCultureInfo that represents the parent culture of the
current sfCultureInfo
returns parent culture information.
-
Gets a list of scripts in the language of the localized version.
returns list of localized script names.
-
(array) getTimeZones ()
Browse code
Gets a list of timezones in the language of the localized version.
returns list of localized timezones.
-
Loads the ICU culture data for the specific culture identifier.
-
(mixed) searchArray (, )
Browse code
Searches the array for a specific value using a path separated using
slash "/" separated path. e.g to find $info['hello']['world'],
the path "hello/world" will return the corresponding value.
returns the value array using the path
-
Sets the culture for the current instance. The culture indentifier
must be of the form "_(country/region)".
-
Sets the date time format information.
-
Sets the number format information.
-
Simplifies a single element array into its own value.
E.g. array(0 => array('hello'), 1 => 'world');
becomes array(0 => 'hello', 1 => 'world');
returns simplified array.
-
(boolean) validCulture ()
Browse code
Determines if a given culture is valid. Simply checks that the
culture data exists.
returns true if valid, false otherwise.
-
(return) __construct ()
Browse code
Initializes a new instance of the sfCultureInfo class based on the
culture specified by name. E.g. new sfCultureInfo('en_AU');
The culture indentifier must be of the form
"_(country/region/variant)".
returns new sfCultureInfo.
-
Allows functions that begins with 'set' to be called directly
as an attribute/property to retrieve the value.
-
Allows functions that begins with 'set' to be called directly
as an attribute/property to set the value.
-
(string) __toString ()
Browse code
Displays the culture name.
returns the culture name.