Function __global->has_translation
Definitions
sources/translation.php
- Whether translation is available.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: bool
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $from | ?LANGUAGE_NAME | No | No | Null | N/A | N/A | Source language (null: do not consider) |
| $to | ?LANGUAGE_NAME | No | No | Null | N/A | N/A | Destination language (null: do not consider) |
| &$translation_object | ?object | Yes | No | Null | N/A | N/A | Translation object, will be returned by reference (null: search all) |
| &$errormsg | ?string | Yes | No | Null | N/A | N/A | Error message (returned by reference) (null: not set yet) |
Returns
- Whether it is
- Type: boolean
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Whether translation is available.
*
* @param ?LANGUAGE_NAME $from Source language (null: do not consider)
* @param ?LANGUAGE_NAME $to Destination language (null: do not consider)
* @param ?object $translation_object Translation object, will be returned by reference (null: search all)
* @param ?string $errormsg Error message (returned by reference) (null: not set yet)
* @return boolean Whether it is
*/
function has_translation(?string $from = null, ?string $to = null, ?object &$translation_object = null, ?string &$errormsg = null) : bool
* Whether translation is available.
*
* @param ?LANGUAGE_NAME $from Source language (null: do not consider)
* @param ?LANGUAGE_NAME $to Destination language (null: do not consider)
* @param ?object $translation_object Translation object, will be returned by reference (null: search all)
* @param ?string $errormsg Error message (returned by reference) (null: not set yet)
* @return boolean Whether it is
*/
function has_translation(?string $from = null, ?string $to = null, ?object &$translation_object = null, ?string &$errormsg = null) : bool

