- Symphony 2.3.1
-
› assets
11 -
› boot
9 -
› core
22 -
› cryptography
4 -
› email-gateways
3 -
› interface
6 -
› toolkit
72 -
› Unknown
38 - Delegates91
- Deprecated28
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 #43The Lang class loads and manages languages
Methods
static array Dictionary()
Get the current dictionary
Returns
Return the dictionary
static array Languages()
Get a list of either enabled or disabled languages. Example:
array(
[...]
'en' => array(
'name' => 'English',
'handle' => 'english',
'extensions' => array()
),
'it' => array(
'name' => 'Italiano',
'handle' => 'italian',
'extensions' => array(
[...]
)
),
[...]
)
Returns
Return an array of languages (both enabled and disabled)
See Also
static array Transliterations()
Get transliterations
Returns
Returns the transliterations array
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 string get()
Get current language
static array getAvailableLanguages(
$checkStatus)
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.
Parameters
Returns
Returns an associative array of language codes and names, e. g. 'en' => 'English'
static void initialize()
Initialize transliterations, datetime dictionary and languages array.
static boolean isLanguageEnabled(
$code)
Given a valid language code, this function checks if the language is enabled.
Parameters
Returns
If true, the language is enabled.
static boolean isLocalized()
Check if Symphony is localised.
Returns
Returns true for localized system, false for English system
static boolean isUnicodeCompiled()
Returns boolean if PHP has been compiled with unicode support. This is useful to determine if unicode modifier's can be used in regular expression's
See Also
static string localizeDate(
$string)
Localize dates.
Parameters
Returns
Return the given date with translated month and day names
static void set(
$code, $checkStatus)
Set system language, load translations for core and extensions. If the specified language cannot be found, Symphony will default to English.
Note: Beginning with Symphony 2.2 translations bundled with extensions will only be loaded when the core dictionary of the specific language is available.
Parameters
static string standardizeDate(
$string)
Standardize dates.
Parameters
Returns
Returns the given date with English month and day names
static string translate(
$string, $inserts, $namespace)
This function is an internal alias for __()
.
Parameters
Returns
Returns the translated string