Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
MediaWiki\Extension\Translate\TranslatorInterface\Aid\PrefillTranslationHook Interface Reference

This is a hook handler interface, see docs/Hooks.md in core. More...

Inheritance diagram for MediaWiki\Extension\Translate\TranslatorInterface\Aid\PrefillTranslationHook:
MediaWiki\Extension\Translate\HookRunner

Public Member Functions

 onTranslatePrefillTranslation (?string &$translation, MessageHandle $handle)
 Provides an opportunity for a new translation to start not from as a carte blanche (the default) but from some prefilled string.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md in core.

Use the hook name "TranslatePrefillTranslation" to register handlers implementing this interface.

@stable to implement

Definition at line 15 of file PrefillTranslationHook.php.

Member Function Documentation

◆ onTranslatePrefillTranslation()

MediaWiki\Extension\Translate\TranslatorInterface\Aid\PrefillTranslationHook::onTranslatePrefillTranslation ( ?string & $translation,
MessageHandle $handle )

Provides an opportunity for a new translation to start not from as a carte blanche (the default) but from some prefilled string.

Parameters
string | null&$translationThe translation string as it stands, or null for new translations
MessageHandle$handleThe current MessageHandle object
Returns
bool|void True or no return value to continue or false to abort

Implemented in MediaWiki\Extension\Translate\HookRunner.


The documentation for this interface was generated from the following file: