PHP 클래스 L10n, BicBucStriim

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

공개 프로퍼티들

프로퍼티 타입 설명
$langa array Messages of primary localization language
$langb array Messages of fallback localization language
$user_lang string User language

공개 메소드들

메소드 설명
__construct ( string $lang ) Find the user language, either one of the allowed languages or English as a fallback. Store the English messages as an alternative for incomplete translations.
message ( string $id ) : string Return a localized message string for $id.
offsetExists ( $id ) Implement this part of the Array interface for easier access by the templates.
offsetGet ( $id ) Implement this part of the Array interface for easier access by the templates.

메소드 상세

__construct() 공개 메소드

Find the user language, either one of the allowed languages or English as a fallback. Store the English messages as an alternative for incomplete translations.
public __construct ( string $lang )
$lang string user language (according to client)

message() 공개 메소드

If there is no defined message for $id in the current language the function looks for an alterantive in English. If that also fails an error message is returned. If $id is NULL or '' the empty string will be returned.
public message ( string $id ) : string
$id string message id
리턴 string localized message string

offsetExists() 공개 메소드

Always return true, because then ::message will return an error string for undefined IDs.
public offsetExists ( $id )

offsetGet() 공개 메소드

Just call ::message.
public offsetGet ( $id )

프로퍼티 상세

$langa 공개적으로 프로퍼티

Messages of primary localization language
public array $langa
리턴 array

$langb 공개적으로 프로퍼티

Messages of fallback localization language
public array $langb
리턴 array

$user_lang 공개적으로 프로퍼티

User language
public string $user_lang
리턴 string