Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp
Commits
821d817b
Unverified
Commit
821d817b
authored
6 years ago
by
Tim van Dijen
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add phpdoc
parent
117a02ea
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/SimpleSAML/Locale/Localization.php
+28
-0
28 additions, 0 deletions
lib/SimpleSAML/Locale/Localization.php
with
28 additions
and
0 deletions
lib/SimpleSAML/Locale/Localization.php
+
28
−
0
View file @
821d817b
...
...
@@ -23,47 +23,65 @@ class Localization
/**
* The default gettext domain.
*
* @var string
*/
const
DEFAULT_DOMAIN
=
'messages'
;
/**
* Old internationalization backend included in SimpleSAMLphp.
*
* @var string
*/
const
SSP_I18N_BACKEND
=
'SimpleSAMLphp'
;
/**
* An internationalization backend implemented purely in PHP.
*
* @var string
*/
const
GETTEXT_I18N_BACKEND
=
'gettext/gettext'
;
/**
* The default locale directory
*
* @var string
*/
private
$localeDir
;
/**
* Where specific domains are stored
*
* @var array
*/
private
$localeDomainMap
=
array
();
/**
* Pointer to currently active translator
*
* @var Gettext\Translator
*/
private
$translator
;
/**
* Pointer to current Language
*
* @var Language
*/
private
$language
;
/**
* Language code representing the current Language
*
* @var string
*/
private
$langcode
;
/**
* The language backend to use
*
* @var string
*/
public
$i18nBackend
;
...
...
@@ -85,6 +103,8 @@ class Localization
/**
* Dump the default locale directory
*
* @return string
*/
public
function
getLocaleDir
()
{
...
...
@@ -96,6 +116,8 @@ class Localization
* Get the default locale dir for a specific module aka. domain
*
* @param string $domain Name of module/domain
*
* @return string
*/
public
function
getDomainLocaleDir
(
$domain
)
{
...
...
@@ -139,6 +161,8 @@ class Localization
*
* @param string $domain Name of localization domain
* @throws Exception If the path does not exist even for the default, fallback language
*
* @return string
*/
public
function
getLangPath
(
$domain
=
self
::
DEFAULT_DOMAIN
)
{
...
...
@@ -230,6 +254,8 @@ class Localization
* Test to check if backend is set to default
*
* (if false: backend unset/there's an error)
*
* @return bool
*/
public
function
isI18NBackendDefault
()
{
...
...
@@ -257,6 +283,8 @@ class Localization
/**
* Show which domains are registered
*
* @return array
*/
public
function
getRegisteredDomains
()
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment