PHP 클래스 SimpleSAML\Locale\Localization

파일 보기 프로젝트 열기: simplesamlphp/simplesamlphp 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( SimpleSAML_Configuration $configuration ) Constructor
addDomain ( $localeDir, $domain ) * Add a new translation domain (We're assuming that each domain only exists in one place)
addModuleDomain ( $module, $localeDir = null ) * Add a new translation domain from a module (We're assuming that each domain only exists in one place)
getDomainLocaleDir ( string $domain ) Get the default locale dir for a specific module aka. domain
getLangPath ( $domain = self::DEFAULT_DOMAIN ) * Get and check path of localization file
getLocaleDir ( ) Dump the default locale directory
getRegisteredDomains ( ) Show which domains are registered
isI18NBackendDefault ( ) Test to check if backend is set to default

비공개 메소드들

메소드 설명
loadGettextGettextFromPO ( string $domain = self::DEFAULT_DOMAIN, boolean $catchException = true ) Load translation domain from Gettext/Gettext using .po
setupL10N ( ) Set up L18N if configured or fallback to old system
setupTranslator ( ) Setup the translator

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( SimpleSAML_Configuration $configuration )
$configuration SimpleSAML_Configuration Configuration object

addDomain() 공개 메소드

* Add a new translation domain (We're assuming that each domain only exists in one place)
public addDomain ( $localeDir, $domain )
$localeDir Location of translations
$domain Domain at location

addModuleDomain() 공개 메소드

* Add a new translation domain from a module (We're assuming that each domain only exists in one place)
public addModuleDomain ( $module, $localeDir = null )
$module Module name
$localeDir Absolute path if the module is housed elsewhere

getDomainLocaleDir() 공개 메소드

Get the default locale dir for a specific module aka. domain
public getDomainLocaleDir ( string $domain )
$domain string Name of module/domain

getLangPath() 공개 메소드

* Get and check path of localization file
public getLangPath ( $domain = self::DEFAULT_DOMAIN )
$domain Name of localization domain

getLocaleDir() 공개 메소드

Dump the default locale directory
public getLocaleDir ( )

getRegisteredDomains() 공개 메소드

Show which domains are registered

isI18NBackendDefault() 공개 메소드

(if false: backend unset/there's an error)