Extension:Translate/Hooks/TranslatePrefillTranslation

From Linux Web Expert

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
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 / src/TranslatorInterface/Aid/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

  • string|null &$translation: The translation string as it stands, or null for new translations
  • MessageHandle $handle: The current MessageHandle object