Topic on Help talk:Extension:Translate

Hide "Translate this page" link, or protect translations of page?

2
Summary by PKFP

Thanks for the reply. I guess I just found a good solution. I just edited the source code of the Main Page to: <languages/><translate><!--T:2--> <!--If you want to edit or translate the Main Page you have to edit or translate the sub-templates of Template:Main_Page--></translate>{{Main Page}} So editors and translators both get the hint.

PKFP (talkcontribs)

Hi, Our main page has the following source code: <languages/><translate></translate>{{Main Page}}. So there is nothing to edit or translate (except the title "Main Page") and people should edit or translate the template instead. Is there a possibility to hide the "Translate this page" link, so I can replace it with a link to the Template? Thanks.

Tacsipacsi (talkcontribs)

I don’t think there’s an officially supported solution for that, but I don’t think it makes sense either. You should decide whether you want the page to be translatable: if yes, the link shouldn’t be hidden; if no, the page shouldn’t be marked for translation. If nothing except for the title is translatable, then there is something that’s translatable: the title.

You have some options:

  • (Supported and IMO best solution) Merge the template into the main page
  • (Supported) Keep the link for translating the main page, add a link in wikitext to Special:Translate/page-Template:Main Page
  • (Unsupported, I recommend against it) Add the link in wikitext and hide the link for translating the main page itself using the CSS .mw-pt-translate-header { display: none; }