- Symphony 2.2.3
-
› assets
11 -
› boot
9 -
› core
22 -
› email-gateways
3 -
› toolkit
67 -
› Unknown
33 - Delegates87
- 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 Dictionary
class.lang.php #44The Dictionary class contains a dictionary of all strings of the active system language. It allows strings to be added, removed, found or translated. It also offers a function to merge different dictionaries which is used to combine core and extension translations. The Dictionary class should only be used internally: for string translations and languages activation please use the translation function and make use of the Lang class provided in this file.
Methods
void __construct(
$strings)
The constructor for Dictionary.
Parameters
void add(
$source, $translation)
Given a source string an its translation, add both to the current dictionary.
Parameters
string|boolean find(
$string)
Given a string, return its translation.
Parameters
Returns
Returns either the translation of the string or false if it could not be found
void merge(
$strings, $string)
Given an associative array of strings, merge it with the current dictionary.
Parameters
void remove(
$string)
Given an English string, remove it from the current dictionary.
Parameters
string translate(
$string, $inserts)
The translation function accepts an English string and returns its translation to the active system language. If the given string is not available in the current dictionary the original English string will be returned. Given an optional array of inserts the function will also replace translation placeholders using vsprintf().
Note: If you like to translate strings, please use __() which is the common alias for this function.
Parameters
Returns
Returns the translated string