- Symphony 2.2.1
-
› boot
9 -
› core
22 -
› email-gateways
3 -
› toolkit
66 -
› Unknown
33 - Delegates83
- Deprecated30
Versions
- 2.7.9
- 2.7.8
- 2.7.7
- 2.7.6
- 2.7.5
- 2.7.3
- 2.7.2
- 2.7.10
- 2.7.1
- 2.7.0
- 2.6.9
- 2.6.8
- 2.6.7
- 2.6.6
- 2.6.5
- 2.6.4
- 2.6.3
- 2.6.2
- 2.6.11
- 2.6.10
- 2.6.1
- 2.6.0
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2
Options
public class Lang
class.lang.php #148The Lang class loads and manages languages
Properties
static array $_dates
Array of months and weekday for localized date output
static array $_languages
Context information of all available languages
Methods
static Dictionary Dictionary()
Get dictionary
Returns
Return the current dictionary
static array Transliterations()
Get transliterations
Returns
Returns the array of transliterations
static void activate(
$enabled)
Activate language, load translations for core and extensions. If the specified language cannot be found, Symphony will default to English. If no language is available at all, Symphony will throw an error.
Note: Beginning with Symphony 2.2 translations bundled with extensions will only be loaded when the core dictionary of the specific language is available.
static string createFilename(
$string, $delim, $apply_transliteration)
Given a string, this will clean it for use as a filename. Preserves multi-byte characters.
Parameters
Returns
Returns created filename
static string createHandle(
$string, $max_length, $delim, $uriencode, $apply_transliteration, $additional_rule_set)
Given a string, this will clean it for use as a Symphony handle. Preserves multi-byte characters.
Parameters
Returns
Returns resultant handle
static void fetch()
Fetch all languages available in the core language folder and the language extensions.
The function stores all language information in the public variable $_languages
.
It contains an array with the name, source, path and status of each language.
Furthermore it add an array of all extensions available in a specific language. The language
status (enabled/disabled) can only be determined when the Extension Manager has been
initialized before. During installation all extension status are set to disabled.
static string get()
Get current language
static array getAvailableLanguages(
$enabled)
Get an array of the codes and names of all languages that are available system wide.
Note: Beginning with Symphony 2.2 language files are only available when the language extension is explicitly enabled.
Returns
Returns an associative array of language codes and names, e. g. 'en' => 'English'
static void initialize()
Initialize dictionary, transliterations and dates array
boolean isLocalized()
Check if Symphony is localised.
Returns
Returns true for localized system, false for English system
static void load(
$path, $clear)
Load language file. Each language file contains three arrays: about, dictionary and transliterations.
Parameters
static string localizeDate(
$string)
Localize dates.
Parameters
Returns
Return the given date with translated month and day names
static void set(
$lang, $enabled)
Set system language.
Parameters
static string standardizeDate(
$string)
Standardize dates.
Parameters
Returns
Returns the given date with English month and day names