Short function that provides the text translation for the text ID for the given language.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $text_id | by value | string |
Text ID |
|
| $lng | by value | string | "" |
The language. If it is not specified, the default language is used. |
| $default_text | by value | string | "" |
The default text to be used if there is no translation. |
Returns the translation text or the $text_id if no translation is found.
It might throw the following exceptions in the case of any errors: