PHP 클래스 Frontend\Core\Engine\Language

사용 중단:
상속: extends Frontend\Core\Language\Language
파일 보기 프로젝트 열기: forkcms/forkcms 1 사용 예제들

공개 메소드들

메소드 설명
act ( string $key, boolean $fallback = true ) : string Get an action from the language-file
buildCache ( string $language, string $application ) Build the language files
err ( string $key, boolean $fallback = true ) : string Get an error from the language-file
getAction ( string $key, boolean $fallback = true ) : string Get an action from the language-file
getActions ( ) : array Get all the actions
getActiveLanguages ( ) : array Get the active languages
getBrowserLanguage ( boolean $forRedirect = true ) : string Get the preferred language by using the browser-language
getError ( string $key, boolean $fallback = true ) : string Get an error from the language-file
getErrors ( ) : array Get all the errors
getLabel ( string $key, boolean $fallback = true ) : string Get a label from the language-file
getLabels ( ) : array Get all the labels
getMessage ( string $key, boolean $fallback = true ) : string Get a message from the language-file
getMessages ( ) : array Get all the messages
getRedirectLanguages ( ) : array Get the redirect languages
lbl ( string $key, boolean $fallback = true ) : string Get a label from the language-file
msg ( string $key, boolean $fallback = true ) : string Get a message from the language-file
setLocale ( string $language = null, boolean $force = false ) Set locale

메소드 상세

act() 공개 정적인 메소드

Get an action from the language-file
public static act ( string $key, boolean $fallback = true ) : string
$key string The key to get.
$fallback boolean Should we provide a fallback in English?
리턴 string

buildCache() 공개 정적인 메소드

Build the language files
사용 중단:
public static buildCache ( string $language, string $application )
$language string The language to build the locale-file for.
$application string The application to build the locale-file for.

err() 공개 정적인 메소드

Get an error from the language-file
public static err ( string $key, boolean $fallback = true ) : string
$key string The key to get.
$fallback boolean Should we provide a fallback in English?
리턴 string

getAction() 공개 정적인 메소드

Get an action from the language-file
사용 중단:
public static getAction ( string $key, boolean $fallback = true ) : string
$key string The key to get.
$fallback boolean Should we provide a fallback in English?
리턴 string

getActions() 공개 정적인 메소드

Get all the actions
public static getActions ( ) : array
리턴 array

getActiveLanguages() 공개 정적인 메소드

Get the active languages
public static getActiveLanguages ( ) : array
리턴 array

getBrowserLanguage() 공개 정적인 메소드

Get the preferred language by using the browser-language
public static getBrowserLanguage ( boolean $forRedirect = true ) : string
$forRedirect boolean Only look in the languages to redirect?
리턴 string

getError() 공개 정적인 메소드

Get an error from the language-file
public static getError ( string $key, boolean $fallback = true ) : string
$key string The key to get.
$fallback boolean Should we provide a fallback in English?
리턴 string

getErrors() 공개 정적인 메소드

Get all the errors
public static getErrors ( ) : array
리턴 array

getLabel() 공개 정적인 메소드

Get a label from the language-file
public static getLabel ( string $key, boolean $fallback = true ) : string
$key string The key to get.
$fallback boolean Should we provide a fallback in English?
리턴 string

getLabels() 공개 정적인 메소드

Get all the labels
public static getLabels ( ) : array
리턴 array

getMessage() 공개 정적인 메소드

Get a message from the language-file
public static getMessage ( string $key, boolean $fallback = true ) : string
$key string The key to get.
$fallback boolean Should we provide a fallback in English?
리턴 string

getMessages() 공개 정적인 메소드

Get all the messages
public static getMessages ( ) : array
리턴 array

getRedirectLanguages() 공개 정적인 메소드

Get the redirect languages
public static getRedirectLanguages ( ) : array
리턴 array

lbl() 공개 정적인 메소드

Get a label from the language-file
public static lbl ( string $key, boolean $fallback = true ) : string
$key string The key to get.
$fallback boolean Should we provide a fallback in English?
리턴 string

msg() 공개 정적인 메소드

Get a message from the language-file
public static msg ( string $key, boolean $fallback = true ) : string
$key string The key to get.
$fallback boolean Should we provide a fallback in English?
리턴 string

setLocale() 공개 정적인 메소드

Set locale
public static setLocale ( string $language = null, boolean $force = false )
$language string The language to load, if not provided we will load the language based on the URL.
$force boolean Force the language, so don't check if the language is active.