PHP Class pocketmine\lang\BaseLang

Show file Open project: ClearSkyTeam/ClearSky

Protected Properties

Property Type Description
$fallbackLang
$lang
$langName

Public Methods

Method Description
__construct ( $lang, $path = null, $fallback = self::FALLBACK_LANGUAGE )
get ( $id )
getLang ( )
getName ( )
internalGet ( $id )
translate ( TextContainer $c )
translateString ( string $str, array $params = [], $onlyPrefix = null ) : string

Protected Methods

Method Description
loadLang ( $path, array &$d )
parseTranslation ( $text, $onlyPrefix = null )

Method Details

__construct() public method

public __construct ( $lang, $path = null, $fallback = self::FALLBACK_LANGUAGE )

get() public method

public get ( $id )

getLang() public method

public getLang ( )

getName() public method

public getName ( )

internalGet() public method

public internalGet ( $id )

loadLang() protected method

protected loadLang ( $path, array &$d )
$d array

parseTranslation() protected method

protected parseTranslation ( $text, $onlyPrefix = null )

translate() public method

public translate ( TextContainer $c )
$c pocketmine\event\TextContainer

translateString() public method

public translateString ( string $str, array $params = [], $onlyPrefix = null ) : string
$str string
$params array
return string

Property Details

$fallbackLang protected property

protected $fallbackLang

$lang protected property

protected $lang

$langName protected property

protected $langName