PHP Class l, kirby

Some handy methods to handle multi-language support
ファイルを表示 Open project: bastianallgeier/kirby Class Usage Examples

Public Properties

Property Type Description
$lang array The global language array

Public Methods

Method Description
change ( $language = 'en' )
current ( )
get ( mixed $key = null, mixed $default = null ) : mixed Gets a language value by key
load ( $file )
locale ( $language = false )
sanitize ( $language )
set ( mixed $key, mixed $value = null ) Sets a language value by key

Method Details

change() static public method

static public change ( $language = 'en' )

current() static public method

static public current ( )

get() static public method

Gets a language value by key
static public get ( mixed $key = null, mixed $default = null ) : mixed
$key mixed The key to look for. Pass false or null to return the entire language array.
$default mixed Optional default value, which should be returned if no element has been found
return mixed

load() static public method

static public load ( $file )

locale() static public method

static public locale ( $language = false )

sanitize() static public method

static public sanitize ( $language )

set() static public method

Sets a language value by key
static public set ( mixed $key, mixed $value = null )
$key mixed The key to define
$value mixed The value for the passed key

Property Details

$lang public_oe static_oe property

The global language array
public static array $lang
return array