Extension:Translate/Hooks/TranslatePrefillTranslation

From mediawiki.org
Jump to navigation Jump to search
TranslatePrefillTranslation
Available from version ??? (Gerrit change 41835)
Provides an opportunity for a new translation to start not from as a carte blanche (the default) but from some prefilled string
Define function:
public static function onTranslatePrefillTranslation( &$translation, $handle ) { ... }
Attach hook:
$wgHooks['TranslatePrefillTranslation'][] = 'MyExtensionHooks::onTranslatePrefillTranslation';
Called from:File(s): Translate / translationaids\CurrentTranslationAid.php
Function(s): getData

For more information about attaching hooks, see Manual:Hooks .
For examples of other extensions using this hook, see Category:TranslatePrefillTranslation extensions.

Details[edit]

  • string &$translation: The translation string as it stands
  • MessageHandle $handle: The current MessageHandle object