[ Index ] |
PHP Cross Reference of phpBB-3.2.11-deutsch |
[Source view] [Print] [Project Stats]
This file is part of the phpBB Forum Software package.
Copyright: | (c) phpBB Limited |
License: | GNU General Public License, version 2 (GPL-2.0) |
File Size: | 673 lines (18 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
language:: (16 methods):
__construct()
set_user_language()
set_default_language()
get_lang_array()
add_lang()
is_set()
lang()
lang_raw()
lang_array()
load_common_language_files()
get_plural_form()
get_used_language()
set_fallback_array()
load_core_file()
load_extension()
reload_language_files()
__construct(language_file_loader $loader, $common_modules = null) X-Ref |
Constructor param: \phpbb\language\language_file_loader $loader Language file loader param: array|null $common_modules Array of common language modules to load (optional) |
set_user_language($user_lang_iso, $reload = false) X-Ref |
Function to set user's language to display. param: string $user_lang_iso ISO code of the User's language param: bool $reload Whether or not to reload language files |
set_default_language($default_lang_iso, $reload = false) X-Ref |
Function to set the board's default language to display. param: string $default_lang_iso ISO code of the board's default language param: bool $reload Whether or not to reload language files |
get_lang_array() X-Ref |
Returns language array Note: This function is needed for the BC purposes, until \phpbb\user::lang[] is not removed. return: array Array of loaded language strings |
add_lang($component, $extension_name = null) X-Ref |
Add Language Items Examples: <code> $component = array('posting'); $component = array('posting', 'viewtopic') $component = 'posting' </code> param: string|array $component The name of the language component to load param: string|null $extension_name Name of the extension to load component from, or null for core file |
is_set($key) X-Ref |
param: $key array|string The language key we want to know more about. Can be string or array. return: bool Returns whether the language key is set. |
lang() X-Ref |
Advanced language substitution Function to mimic sprintf() with the possibility of using phpBB's language system to substitute nullar/singular/plural forms. Params are the language key and the parameters to be substituted. This function/functionality is inspired by SHS` and Ashe. Example call: <samp>$user->lang('NUM_POSTS_IN_QUEUE', 1);</samp> If the first parameter is an array, the elements are used as keys and subkeys to get the language entry: Example: <samp>$user->lang(array('datetime', 'AGO'), 1)</samp> uses $user->lang['datetime']['AGO'] as language entry. return: string Return localized string or the language key if the translation is not available |
lang_raw($key) X-Ref |
Returns the raw value associated to a language key or the language key no translation is available. No parameter substitution is performed, can be a string or an array. param: string|array $key Language key return: array|string |
lang_array($key, array $args = []) X-Ref |
Act like lang() but takes a key and an array of parameters instead of using variadic param: string|array $key Language key param: array $args Parameters return: string |
load_common_language_files() X-Ref |
Loads common language files |
get_plural_form($number, $force_rule = false) X-Ref |
Determine which plural form we should use. For some languages this is not as simple as for English. param: int|float $number The number we want to get the plural case for. Float numbers are floored. param: int|bool $force_rule False to use the plural rule of the language package return: int The plural-case we need to use for the number plural-rule combination |
get_used_language() X-Ref |
Returns the ISO code of the used language return: string The ISO code of the currently used language |
set_fallback_array($reload = false) X-Ref |
Returns language fallback data param: bool $reload Whether or not to reload language files return: array |
load_core_file($component) X-Ref |
Load core language file param: string $component Name of the component to load |
load_extension($extension_name, $component) X-Ref |
Load extension language file param: string $extension_name Name of the extension to load language from param: string $component Name of the component to load |
reload_language_files() X-Ref |
Reload language files |
Generated: Wed Nov 11 20:33:01 2020 | Cross-referenced by PHPXref 0.7.1 |