PHP Class l, kirby

Some handy methods to handle multi-language support
Afficher le fichier Open project: bastianallgeier/kirby Class Usage Examples

Méthodes publiques

Свойство Type Description
$lang array The global language array

Méthodes publiques

Méthode 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 méthode

static public change ( $language = 'en' )

current() static public méthode

static public current ( )

get() static public méthode

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
Résultat mixed

load() static public méthode

static public load ( $file )

locale() static public méthode

static public locale ( $language = false )

sanitize() static public méthode

static public sanitize ( $language )

set() static public méthode

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
Résultat array