|
ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
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... | |
| $i18nBackend | |
| The language backend to use. 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 | |
| The default locale directory. More... | |
| $localeDomainMap = array() | |
| Where specific domains are stored. More... | |
| $translator | |
| Pointer to currently active translator. More... | |
| $language | |
| Pointer to current Language. More... | |
| $langcode | |
| Language code representing the current Language. More... | |
Definition at line 15 of file Localization.php.
| SimpleSAML\Locale\Localization::__construct | ( | \SimpleSAML_Configuration | $configuration | ) |
Constructor.
| \SimpleSAML_Configuration | $configuration | Configuration object |
Definition at line 75 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 130 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 114 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 100 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 143 of file Localization.php.
References $_SERVER, $domain, SimpleSAML\Locale\Localization\$langcode, 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 89 of file Localization.php.
References SimpleSAML\Locale\Localization\$localeDir.
| SimpleSAML\Locale\Localization::getRegisteredDomains | ( | ) |
Show which domains are registered.
Definition at line 261 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 234 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 203 of file Localization.php.
References $_SERVER, $domain, 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 246 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 185 of file Localization.php.
Referenced by SimpleSAML\Locale\Localization\setupL10N().
Here is the caller graph for this function:
|
private |
Definition at line 22 of file Localization.php.
Referenced by SimpleSAML\Locale\Localization\__construct().
| SimpleSAML\Locale\Localization::$i18nBackend |
The language backend to use.
Definition at line 68 of file Localization.php.
|
private |
Language code representing the current Language.
Definition at line 62 of file Localization.php.
Referenced by SimpleSAML\Locale\Localization\getLangPath().
|
private |
Pointer to current Language.
Definition at line 57 of file Localization.php.
|
private |
The default locale directory.
Definition at line 42 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 |
Where specific domains are stored.
Definition at line 47 of file Localization.php.
Referenced by SimpleSAML\Locale\Localization\getRegisteredDomains().
|
private |
Pointer to currently active translator.
Definition at line 52 of file Localization.php.
| const SimpleSAML\Locale\Localization::DEFAULT_DOMAIN = 'messages' |
The default gettext domain.
Definition at line 27 of file Localization.php.
| const SimpleSAML\Locale\Localization::GETTEXT_I18N_BACKEND = 'gettext/gettext' |
An internationalization backend implemented purely in PHP.
Definition at line 37 of file Localization.php.
| const SimpleSAML\Locale\Localization::SSP_I18N_BACKEND = 'SimpleSAMLphp' |
Old internationalization backend included in SimpleSAMLphp.
Definition at line 32 of file Localization.php.