Function __global->require_lang

Definitions

sources/lang.php

  • Includes a language file for use in the script.If $type is not null, then this specifies whether to use 'lang_custom' or 'custom' (otherwise, normal priorities occur).
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$codename ID_TEXT No No required parameter N/A N/A The language file name
$lang ?LANGUAGE_NAME No No Null N/A N/A The language (null: uses the current language)
$type ?string No No Null lang_custom custom N/A The language type (lang_custom, or custom) (null: normal priorities are used)
$ignore_errors boolean No No False N/A N/A Whether to just return if there was a loading error

Preview

Code (PHP)

/**
 * Includes a language file for use in the script.If $type is not null, then this specifies whether to use 'lang_custom' or 'custom' (otherwise, normal priorities occur).
 *
 * @param  ID_TEXT $codename The language file name
 * @param  ?LANGUAGE_NAME $lang The language (null: uses the current language)
 * @param  ?string $type The language type (lang_custom, or custom) (null: normal priorities are used)
 * @set lang_custom custom
 * @param  boolean $ignore_errors Whether to just return if there was a loading error
 */

function require_lang(string $codename, ?string $lang = null, ?string $type = null, bool $ignore_errors = false)