Skip to content

reference:U getLang

Aaron Junker edited this page Apr 24, 2021 · 3 revisions

Function $U->getLang(string $string):string

Returns a translated string. It always returns the string of the current language set in the site.lang setting.

If the string isn't translated it returns the English string.

If the string can't be found it throws an exception.

It takes the string from /lang/{language-code}.json.

Arguments

$string

The name of the string.

Return value

The translated string.

Example

$U->getString("errors.404");
Clone this wiki locally