Table of Contents
-
FALLBACK_LANGUAGE
= "eng"
-
$fallbackLang
: array<string|int, string>
-
$lang
: array<string|int, string>
-
$langName
: string
-
__construct()
: mixed
-
get()
: string
-
getLang()
: string
-
getLanguageList()
: array<string|int, string>
-
getName()
: string
-
translate()
: string
-
translateString()
: string
-
internalGet()
: string|null
-
loadLang()
: array<string|int, string>
-
parseTranslation()
: string
FALLBACK_LANGUAGE
public
mixed
FALLBACK_LANGUAGE
= "eng"
$fallbackLang
protected
array<string|int, string>
$fallbackLang
= []
-
phpstan-var
-
$lang
protected
array<string|int, string>
$lang
= []
-
phpstan-var
-
$langName
protected
string
$langName
__construct()
public
__construct(string $lang[, string|null $path = null ][, string $fallback = self::FALLBACK_LANGUAGE ]) : mixed
Parameters
-
$lang
: string
-
-
$path
: string|null
= null
-
-
$fallback
: string
= self::FALLBACK_LANGUAGE
-
-
throws
-
LanguageNotFoundException
Return values
mixed
—
get()
public
get(string $id) : string
Parameters
-
$id
: string
-
Return values
string
—
getLang()
public
getLang() : string
Return values
string
—
getLanguageList()
public
static getLanguageList([string $path = "" ]) : array<string|int, string>
Parameters
-
$path
: string
= ""
-
-
phpstan-return
-
-
throws
-
LanguageNotFoundException
Return values
array<string|int, string>
—
getName()
public
getName() : string
Return values
string
—
translate()
public
translate(Translatable $c) : string
Parameters
-
$c
: Translatable
-
Return values
string
—
translateString()
public
translateString(string $str[, array<string|int, float|int|string|\pocketmine\lang\Translatable> $params = [] ][, string|null $onlyPrefix = null ]) : string
Parameters
-
$str
: string
-
-
$params
: array<string|int, float|int|string|\pocketmine\lang\Translatable>
= []
-
-
$onlyPrefix
: string|null
= null
-
Return values
string
—
internalGet()
protected
internalGet(string $id) : string|null
Parameters
-
$id
: string
-
Return values
string|null
—
loadLang()
protected
static loadLang(string $path, string $languageCode) : array<string|int, string>
Parameters
-
$path
: string
-
-
$languageCode
: string
-
-
phpstan-return
-
Return values
array<string|int, string>
—
parseTranslation()
protected
parseTranslation(string $text[, string|null $onlyPrefix = null ]) : string
Parameters
-
$text
: string
-
-
$onlyPrefix
: string|null
= null
-
Return values
string
—