|
ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Collaboration diagram for SimpleSAML\Locale\Localization:Public Member Functions | |
| __construct (\SimpleSAML_Configuration $configuration) | |
| Constructor. More... | |
| getLocaleDir () | |
| Dump the default locale directory. More... | |
| getDomainLocaleDir ($domain) | |
| Get the default locale dir for a specific module aka. More... | |
| addModuleDomain ($module, $localeDir=null) | |
| addDomain ($localeDir, $domain) | |
| getLangPath ($domain=self::DEFAULT_DOMAIN) | |
| isI18NBackendDefault () | |
| Test to check if backend is set to default. More... | |
| getRegisteredDomains () | |
| Show which domains are registered. More... | |
Data Fields | |
| const | DEFAULT_DOMAIN = 'messages' |
| The default gettext domain. More... | |
| const | SSP_I18N_BACKEND = 'SimpleSAMLphp' |
| Old internationalization backend included in SimpleSAMLphp. More... | |
| const | GETTEXT_I18N_BACKEND = 'gettext/gettext' |
| An internationalization backend implemented purely in PHP. More... | |
Private Member Functions | |
| setupTranslator () | |
| Setup the translator. More... | |
| loadGettextGettextFromPO ($domain=self::DEFAULT_DOMAIN, $catchException=true) | |
| Load translation domain from Gettext/Gettext using .po. More... | |
| setupL10N () | |
| Set up L18N if configured or fallback to old system. More... | |
Private Attributes | |
| $configuration | |
| $localeDir | |
| $localeDomainMap = array() | |
| $translator | |
Definition at line 15 of file Localization.php.
| SimpleSAML\Locale\Localization::__construct | ( | \SimpleSAML_Configuration | $configuration | ) |
Constructor.
| \SimpleSAML_Configuration | $configuration | Configuration object |
Definition at line 61 of file Localization.php.
References SimpleSAML\Locale\Localization\$configuration, and SimpleSAML\Locale\Localization\setupL10N().
Here is the call graph for this function:| SimpleSAML\Locale\Localization::addDomain | ( | $localeDir, | |
| $domain | |||
| ) |
Definition at line 116 of file Localization.php.
References $domain, SimpleSAML\Locale\Localization\$localeDir, SimpleSAML\Logger\debug(), and SimpleSAML\Locale\Localization\loadGettextGettextFromPO().
Referenced by SimpleSAML\Locale\Localization\addModuleDomain(), and SimpleSAML\Locale\Localization\setupL10N().
Here is the call graph for this function:
Here is the caller graph for this function:| SimpleSAML\Locale\Localization::addModuleDomain | ( | $module, | |
$localeDir = null |
|||
| ) |
Definition at line 100 of file Localization.php.
References SimpleSAML\Locale\Localization\$localeDir, $module, SimpleSAML\Locale\Localization\addDomain(), and SimpleSAML\Locale\Localization\getDomainLocaleDir().
Here is the call graph for this function:| SimpleSAML\Locale\Localization::getDomainLocaleDir | ( | $domain | ) |
Get the default locale dir for a specific module aka.
domain
| string | $domain | Name of module/domain |
Definition at line 86 of file Localization.php.
References $domain, and SimpleSAML\Locale\Localization\$localeDir.
Referenced by SimpleSAML\Locale\Localization\addModuleDomain().
Here is the caller graph for this function:| SimpleSAML\Locale\Localization::getLangPath | ( | $domain = self::DEFAULT_DOMAIN | ) |
Definition at line 129 of file Localization.php.
References $_SERVER, $domain, $error, SimpleSAML\Locale\Localization\$localeDir, SimpleSAML\Logger\critical(), SimpleSAML\Logger\debug(), and SimpleSAML\Logger\error().
Referenced by SimpleSAML\Locale\Localization\loadGettextGettextFromPO().
Here is the call graph for this function:
Here is the caller graph for this function:| SimpleSAML\Locale\Localization::getLocaleDir | ( | ) |
Dump the default locale directory.
Definition at line 75 of file Localization.php.
References SimpleSAML\Locale\Localization\$localeDir.
| SimpleSAML\Locale\Localization::getRegisteredDomains | ( | ) |
Show which domains are registered.
Definition at line 247 of file Localization.php.
References SimpleSAML\Locale\Localization\$localeDomainMap.
| SimpleSAML\Locale\Localization::isI18NBackendDefault | ( | ) |
Test to check if backend is set to default.
(if false: backend unset/there's an error)
Definition at line 220 of file Localization.php.
|
private |
Load translation domain from Gettext/Gettext using .po.
Note: Since Twig I18N does not support domains, all loaded files are merged. Use contexts if identical strings need to be disambiguated.
| string | $domain | Name of domain |
| boolean | $catchException | Whether to catch an exception on error or return early |
Exception If something is wrong with the locale file for the domain and activated language
Definition at line 189 of file Localization.php.
References $_SERVER, $domain, $error, SimpleSAML\Logger\error(), and SimpleSAML\Locale\Localization\getLangPath().
Referenced by SimpleSAML\Locale\Localization\addDomain().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Set up L18N if configured or fallback to old system.
Definition at line 232 of file Localization.php.
References SimpleSAML\Locale\Localization\addDomain(), SimpleSAML\Logger\debug(), and SimpleSAML\Locale\Localization\setupTranslator().
Referenced by SimpleSAML\Locale\Localization\__construct().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Setup the translator.
Definition at line 171 of file Localization.php.
Referenced by SimpleSAML\Locale\Localization\setupL10N().
Here is the caller graph for this function:
|
private |
Definition at line 23 of file Localization.php.
Referenced by SimpleSAML\Locale\Localization\__construct().
|
private |
Definition at line 43 of file Localization.php.
Referenced by SimpleSAML\Locale\Localization\addDomain(), SimpleSAML\Locale\Localization\addModuleDomain(), SimpleSAML\Locale\Localization\getDomainLocaleDir(), SimpleSAML\Locale\Localization\getLangPath(), and SimpleSAML\Locale\Localization\getLocaleDir().
|
private |
Definition at line 48 of file Localization.php.
Referenced by SimpleSAML\Locale\Localization\getRegisteredDomains().
|
private |
Definition at line 53 of file Localization.php.
| const SimpleSAML\Locale\Localization::DEFAULT_DOMAIN = 'messages' |
The default gettext domain.
Definition at line 28 of file Localization.php.
| const SimpleSAML\Locale\Localization::GETTEXT_I18N_BACKEND = 'gettext/gettext' |
An internationalization backend implemented purely in PHP.
Definition at line 38 of file Localization.php.
| const SimpleSAML\Locale\Localization::SSP_I18N_BACKEND = 'SimpleSAMLphp' |
Old internationalization backend included in SimpleSAMLphp.
Definition at line 33 of file Localization.php.