Help talk:Extension:Translate

Jump to: navigation, search

About this board

By clicking "Add topic", you agree to our Terms of Use and agree to irrevocably release your text under the CC BY-SA 3.0 License and GFDL
LeGiangAnh (talkcontribs)


I followed the guideline and translated the main page to Vietnamese.

However when I switched to Vietnamese language, I cannot see translated text. There is only English one.

Any one please help me.

Reply to "Cannot see translated content"

Use of <translate> within other custom tags

Billinghurst (talkcontribs)

Can anyone identify how one one can use the translation function within something something like the <timeline> function? I have #tag:timeline'd though when I tried <translate> or #tag:translate, of even tried to get the translation outside in its own template, all show the text wrapped inside a visible set of translates tag.

Thanks for any ideas on how to achieve this

Reply to "Use of <translate> within other custom tags"

[RESOLVED] Update untranslatable content in translated pages

Zabien (talkcontribs)

Hello, I have translatable and untranslatable content (like weblinks) on a page. When I alter/delete the untranslatable content on the page, it still shows up in the translated pages. Is there a way to update this information? I do not see the link for marking the page anew, tried "runJobs.php" and "refreshLinks.php" with no effect. What could I do?

Example source page:

  • Content – Untranslatable content - Content

Shows in translated page (DE):

  • Inhalt – Untranslatable content – Inhalt

When I now delete "Untranslatable content" in the source page, it still shows up in the translated pages. Source page:

  • Content – Content

Translated page:

  • Inhalt - Untranslatable content - Inhalt
Nikerabbit (talkcontribs)

Thanks for using Translate. The expected behavior is that the translation pages are updated soon after the source page is marked for translation. If you do not see the link to re-mark for the page, please check that 1) you have the correct permissions on the user account you are using 2) that the source page is mark-up is valid, most importantly the translate tags should be balanced and not nested at any point. Also check Special:PageTranslation whether the page is listed there and whether you find the link to re-mark the page there.

Zabien (talkcontribs)

Thank you for that hint. At Special:PageTranslation I find those pages under "Broken pages": "Older versions of these pages are marked for translation, but the latest versions cannot be marked for translation." That's news to me!

When I remove a page there with "Remove from translation" and look into the source code, everything seems normal, the tags are there. The "mark for translation link" won't show up, though, so I cannot mark it for translation again. Here is the code from the page after removing from translation (The languages bar is included via template). Why are the pages invalid after only deleting a single non-translatable content line? And how can I make this work?

Nemo bis (talkcontribs) was removed from translation and is not listed at all on

It's not corrupted, you simply have to edit it (e.g. change a space) so that Translate "sees" it again. Then you can mark for translation, I think.

As for other pages, I'm not sure why an edit like would corrupt the page, but it may be something very simple. Try adding a newline after a closing translate tag or before an opening one and see if it changes something.

Zabien (talkcontribs)

Thanks a lot! Empty saving seems to do the job. Also, the Language Extension Bundle somehow escaped our last upgrade, still running on a 2013 version (incompatible with the MW version). We upgraded and now it seems to be working better again. Should have checked that first.

Reply to "[RESOLVED] Update untranslatable content in translated pages"
Macofe (talkcontribs)

This is a bit strange. I can translate and modified existing translations, but I can't mark translations as reviewed because it says that my session is closed. But it isn't. Proof ot this is that my translations in the same browser, in the same session, at the same time are saved with my username. I tried closing and opening again my session, but it didn't work. I tried Chromium, Chrome and Iceweasel (Firefox in Debian).

I can't say exactly when this started happennig. Maybe a week or two. Before that, I had no trouble.

Let me know if more information is needed.

Update: I didn't specified the site: it's right here in I have no trouble in meta (see today log)

Update 2: This also happend to me in Could it be the translate extension version?

Update 3: It's already been MediaWiki:Tux-session-expired_shown_when_Reviewing_a_message_44515 reported in by other users.

Nikerabbit (talkcontribs)

A backported fix should be deployed here very soon now.

Reply to "Can't mark translations as reviewed"
Zabien (talkcontribs)

Hello, how can I change the look (and content) of the language box that appears when inserting <languages />? I haven't found anything in documentation about how to access this box and how to style it. It appears and it is working, I'd only like to style it to fit the content. Are there any CSS classes related to it?

Nikerabbit (talkcontribs)

It does have plenty of CSS classes you can use to provide different styling for it. There is no documentation for it so the best way is to look at the source code of a rendered box.

You might be interested that there are plans to change completely how the box is displayed:

Zabien (talkcontribs)

This helps, indeed! Thank you! I'll keep track of that!

Reply to "[RESOLVED] <languages /> box styling" (talkcontribs)


I'd like to know if there is a way (without using ad redirect) to map a traslated page in a page with a translated name. To be more clear, let say I have the Materials page in English. I can translate it in Italian having the Materials/it page. But I'd like to have instead the "Materiali" page (because "Materiali" is the Italian translation of Materials.

I see that Main page is translated in Pagina principale, but I cannot find a way to plain translate the page name mapping it to the translated page.

Nemo bis (talkcontribs)

Sorry, I don't understand what you mean by "map" and "have" here. The "map" is done by translating the page title in Special:Translate; after that you have a page whose display title is "Materiali".

If you mean that you would like the page to actually reside at the title Materiali, that's not possible because the translations should then be unique across all languages. If you mean that you want to link it, same problem, and you should use Special:MyLanguage anyway.

Reply to "mapping translated page names"

Required rights for "Special:PageTranslationDeletePage"

Billinghurst (talkcontribs)

Looking through the documentation, it doesn't seem to explain what rights are required to access the page Special:PageTranslationDeletePage. Is it just the translation administrator right (as used locally through WMF wikis) or is it that right in combination with another right? If it is a combination (which I believe that may be), then it would be useful for the error message to say which rights are required (in combination), rather than the right that is missing. I would also note that Special:SpecialPages does seem to note this deletion page, nor can I find ready reference to its actions either. It would be great if those more knowledgeable would be able to remedy this situation. Thanks.

Nemo bis (talkcontribs)

Works for me on Meta (where I'm translation admin):

You do not have permission to delete this page, for the following reason:
The action you have requested is limited to users in the group: Administrators.

But yes, permissions could be checked earlier. I expanded docs a bit.

And yes, it's one of many unlisted special pages.

Billinghurst (talkcontribs)

I have specifically mentioned the special page, otherwise it sits mute, and not findable by use of search, which I consider less than desirable.

Billinghurst (talkcontribs)

Submitted bugzilla:66472 for listing the extension page on Special:SpecialPages

Reply to "Required rights for "Special:PageTranslationDeletePage""
Stm76 (talkcontribs)

Can I somehow mark many pages at once for translation?

I tried exporting them to xml, adding translate Tags to the text and importing again. But Translate didn't even notice the translate tags; only after manually editing the page does the "mark for translation" option appear. Is there a a recommended way to do this?

Nemo bis (talkcontribs)

XML import is still the fastest; we have added about 300 translatable pages in Meta-Wiki in that way, in a couple days. The only alternative I know of is being worked on at Extension:Translate/Mass migration tools.

Stm76 (talkcontribs)

... meaning that you imported them and then marked them for translation manually? Or was there some other kind of trick involved?

Nemo bis (talkcontribs)

Yes, dummy edited and marked manually. It's four clicks and a keystroke for each page and all of them very repetitive, I estimate 30 seconds per page. :)

Ricordisamoa (talkcontribs)

A bot can be used to null-edit all pages and then to mark them for translation.

Reply to "mass-mark for translation"
Jarekt (talkcontribs)

I was asked to help with translation of Commons:Commons:Senate of Poland. Everything went well except that once everything was translated the polish and french pages claims to be 89% translated instead of 100%. See . It seems like something is 11% outdated but I can not find what and how to fix it. Also there is a problem with categorization. On Commons we never categorize language subtemplates, but this extension seems to do it, see Commons:Category:Wikimedia Polska is there a way to fix it, or is this something I should file a bug report about?

Reply to "Can't find outdated text"

Special page Special:SupportedLanguages php error

Hutchy68 (talkcontribs)


I'm scratching my head on this php error being thrown on Special:SupportedLanguages. The page works fine on my local. Using the same extension configurations setup on production server. MW 1.21.5, latest same language bundle on local and production server.

Warning: array_merge() expects at least 1 parameter, 0 given in /home/server/public_html/extensions/Translate/specials/SpecialSupportedLanguages.php on line 96

Warning: array_keys() expects parameter 1 to be array, null given in /home/server/public_html/extensions/Translate/specials/SpecialSupportedLanguages.php on line 96

Warning: Invalid argument supplied for foreach() in /home/server/public_html/extensions/Translate/specials/SpecialSupportedLanguages.php on line 364

Notice: Undefined variable: keys in /home/server/public_html/extensions/Translate/specials/SpecialSupportedLanguages.php on line 368

Catchable fatal error: Argument 1 passed to SqlBagOStuff::getMulti() must be of the type array, null given, called in /home/server/public_html/extensions/Translate/specials/SpecialSupportedLanguages.php on line 368 and defined in /home/server/public_html/includes/objectcache/SqlBagOStuff.php on line 212

A hint at what to look at or for greatly appreciated. Obviously I have something different, but what? Running same exact extensions on both local and production server. Everything else is working great. Thanks!

Nikerabbit (talkcontribs)

There is condition just before line 96 in the code, so I don't know.

Hutchy68 (talkcontribs)

Yes, pulling in user information. RC's from looking at the code? User contribs? I wonder if I rebuild the RC table if that would fix it? I did do a rebuildall when I upgraded after I ran update.php. Thoughts? Thanks

Hutchy68 (talkcontribs)

Hi Nikerabbit, still no joy, the page still has a fatal error. I rebuilt RC's, checked the User table, still failing array_merge and array_keys. Debugging log turned on and it shows nothing for this Special Page. Do you have any suggestions on how to debug this? Thanks.

Nikerabbit (talkcontribs)

In these cases I start adding manual debugging statements in the code until I understand what is going on.

Hutchy68 (talkcontribs)

Thanks Nikerabbit, on a live site so I don't usually like "live debugging" but did it anyway. Seems as if this statement is the issue.

if ( !defined( 'NS_PORTAL' ) ) {
	$users = $this->fetchTranslatorsAuto();
	} else {
	$users = $this->fetchTranslatorsPortal( $natives );

We have NS_PORTAL defined. Funny thing is, I comment out the if statement and use either or to define $users.

	$users = $this->fetchTranslatorsAuto();


	$users = $this->fetchTranslatorsPortal( $natives );

The page works, but the heading of languages is doubled at the top.

dansk български español Bahasa Indonesia français English فارسی Nederlands


español Bahasa Indonesia فارسی dansk English български français Nederlands

Even though the languages are in a different order, any of them link to the page's anchors for the language headings.

Also, all users are wrapped in a <del> tag so they look like this, username. Not sure why they are doing that either.

Thanks for your help.

Nikerabbit (talkcontribs)

That makes sense. We were supposed to get rid of the NS_PORTAL strategy, which would fix the error for you as well. The double list of languages can be just a byproduct of the heavy caching of the page with your debugging output.

Hutchy68 (talkcontribs)

Which $users statement is better? I guess we have a Portal namespace, which we eventually use for the languages. Low on my list. Ideas why the <del> tags are showing up?

Hutchy68 (talkcontribs)

Ok, I have it 1/2 working. I like the page and concept. It is very cool, with great feedback for translation admins or anyone interested. The view is buggy though. Commented out the PORTAL_NS check, just wouldn't work on server. Strike through on the page, every single user under every heading. Call the action=purge and it works for awhile until the cache time expires. Then back to a strike through for every single user again. Buggy. Is this a known bug or should I file one?

Reply to "Special page Special:SupportedLanguages php error"