Function Hook_translation_bing_translator->put_result_into_context
Definitions
sources/hooks/systems/translation/bing_translator.php
- Put a result within some surrounding text, based on the display context.Some translation backends require output text to be displayed in a certain way.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $text_result | string | No | No | required parameter | N/A | N/A | Result text |
| $context | integer | No | No | required parameter | N/A | N/A | A TRANS_TEXT_CONTEXT_* constant |
| $context_metadata | mixed | No | No | required parameter | N/A | N/A | Context metadata for the particular translation effort |
Returns
- Output text
- Type: string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Put a result within some surrounding text, based on the display context.Some translation backends require output text to be displayed in a certain way.
*
* @param string $text_result Result text
* @param integer $context A TRANS_TEXT_CONTEXT_* constant
* @param mixed $context_metadata Context metadata for the particular translation effort
* @return string Output text
*/
public function put_result_into_context(string $text_result, int $context, $context_metadata) : string
* Put a result within some surrounding text, based on the display context.Some translation backends require output text to be displayed in a certain way.
*
* @param string $text_result Result text
* @param integer $context A TRANS_TEXT_CONTEXT_* constant
* @param mixed $context_metadata Context metadata for the particular translation effort
* @return string Output text
*/
public function put_result_into_context(string $text_result, int $context, $context_metadata) : string

