lang_support
class lang_support
| internal |
Utility functions for Moodle language strings.
Methods
static lang_string|string
get(string $identifier, mixed $a = null, bool $lazyload = false, string $component = middag_helper::COMPONENT_NAME)
Retrieves a localized string.
static lang_string|string
get_string(string $identifier, string $component = '', mixed $a = null, bool $lazyload = false)
Retrieves a localized string (alias for get).
static lang_string|string
get_string_or_identifier(string $identifier, string $component = '', mixed $a = null, bool $lazyload = false)
Retrieves a localized string if it exists, otherwise returns the identifier.
static bool
string_exists(string $identifier, string $component = middag_helper::COMPONENT_NAME)
Checks if a language string exists in the component.
static string
pluginname()
Retrieves the plugin name from language strings.
Details
at line 43
static lang_string|string
get(string $identifier, mixed $a = null, bool $lazyload = false, string $component = middag_helper::COMPONENT_NAME)
Retrieves a localized string.
at line 68
static lang_string|string
get_string(string $identifier, string $component = '', mixed $a = null, bool $lazyload = false)
Retrieves a localized string (alias for get).
at line 89
static lang_string|string
get_string_or_identifier(string $identifier, string $component = '', mixed $a = null, bool $lazyload = false)
Retrieves a localized string if it exists, otherwise returns the identifier.
at line 112
static bool
string_exists(string $identifier, string $component = middag_helper::COMPONENT_NAME)
Checks if a language string exists in the component.
at line 134
static string
pluginname()
Retrieves the plugin name from language strings.