Translations:Manual:$mediaWiki/6/en

This variable is only set when the index.php script is executed, it does not exist when executing other entry scripts, like api.php.