Function Hook_translation_google_translate->translate_text
Definitions
sources/hooks/systems/translation/google_translate.php
- Translate some text.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Return: string
Parameters
Name | Type | Default | Set | Range | Description |
---|---|---|---|---|---|
$text | string | required parameter | N/A | N/A | The text to translate |
$context | integer | required parameter | N/A | N/A | A TRANS_TEXT_CONTEXT_* constant |
$context_metadata | mixed | required parameter | N/A | N/A | Context metadata for the particular translation effort |
$from | ?LANGUAGE_NAME | required parameter | N/A | N/A | Source language (null: autodetect from the text itself) |
$to | LANGUAGE_NAME | required parameter | N/A | N/A | Destination language |
$errormsg | ?string | required parameter | N/A | N/A | Error message (returned by reference) (null: not set yet) |
Return
- Translated text (null: some kind of error)
- Type: ?string
- Set: N/A
- Range: N/A