- 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 Symphony.Language
admin.jsThe Language object stores the dictionary with all needed translations. It offers public functions to add strings and get their translation and it offers private functions to handle variables and get the translations via an synchronous AJAX request.
Properties
static NAME
Deprecated
You should now use Symphony.Context.get('lang')
Methods
static Language()
The Language object stores the dictionary with all needed translations. It offers public functions to add strings and get their translation and it offers private functions to handle variables and get the translations via an synchronous AJAX request.
static add(
$strings)
Add strings to the Dictionary
Parameters
static String get(
$string, $inserts)
Get translated string from the Dictionary. The function replaces variables like {$name} with the a specified value if an object of inserts is passed in the function call.
Parameters
Returns
Returns the translated string
static String insert(
$string, $inserts)
This private function replaces variables with a specified value. It should not be called directly.
Parameters
Returns
Returns translated strings with all variables replaced by their actual value
static Object translate(
$strings)
This private function sends a synchronous AJAX request to fetch the translations for the English strings in the dictionary. It should not be called directly
Parameters
Returns
Object with original string and translation pairs