Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
|
Functions | |
static array | _getSearchDirectories () |
Get potential locations for the locale directory. | |
static boolean string | _searchLocaleDirectory () |
Search for the locale directory for different installations methods (eg: PEAR, Composer). | |
static | loadHandler ($handlerClass) |
Loads a translation handler class pointing to the library's translations and assigns it to $_handler. | |
static | ngettext ($singular, $plural, $number) |
Returns the plural translation of a message. | |
static | r ($message) |
Allows a gettext string to be defined and recognized as a string by the horde translation utilities, but no translation is actually performed (raw gettext = r()). | |
static | setHandler ($domain, $handler) |
Assigns a translation handler object to $_handlers. | |
static string | t ($message) |
Returns the translation of a message. | |
|
staticprotected |
Get potential locations for the locale directory.
List of directories
|
staticprotected |
Search for the locale directory for different installations methods (eg: PEAR, Composer).
The directory if found, or false when no valid directory is found
|
static |
Loads a translation handler class pointing to the library's translations and assigns it to $_handler.
string | $handlerClass | The name of a class implementing the Horde_Translation_Handler interface. |
|
static |
Returns the plural translation of a message.
string | $singular | The singular version to translate. |
string | $plural | The plural version to translate. |
integer | $number | The number that determines singular vs. plural. |
string | The string translation, or the original string if no translation exists. |
|
static |
Allows a gettext string to be defined and recognized as a string by the horde translation utilities, but no translation is actually performed (raw gettext = r()).
string | $message | The raw string to mark for translation. |
string | The raw string. |
|
static |
Assigns a translation handler object to $_handlers.
Type hinting isn't used on purpose. You should extend a custom translation handler passed here from the Horde_Translation interface, but technically it's sufficient if you provide the API of that interface.
string | $domain | The translation domain. |
Horde_Translation_Handler | $handler | An object implementing the Horde_Translation_Handler interface. |
|
static |
Returns the translation of a message.
$message The string to translate.
string | The string translation, or the original string if no translation exists. |