Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9131953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:13:43+00:00 2026-06-17T08:13:43+00:00

I write hundred of articles into a MediaWiki (version 1.20.2) through its API using

  • 0

I write hundred of articles into a MediaWiki (version 1.20.2) through its API using a self-programmed PHP script that depends on WikiMate. At the moment, the articles are only written in English. But I want to translate them using the Translate extension, so I have to approve every single article for translation.

For every article there is already an English and a French document, so is there any automated way to write articles in English (default) and the translated article (in French) at once using the API? The Translation should be compatible to the Translate extension.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T08:13:44+00:00Added an answer on June 17, 2026 at 8:13 am

    So this is how I got things to work. You can copy the method execute() from SpecialPageTranslation.php to your custom class. This method will mark an article as translatable. Simply pass it the title of your desired article by instantiating a new Title object with $title = Title::newFromText( 'Title_of_my_article' );. Copy all the methods referenced by $this to your custom class as well. E.g. the method $this->markForTranslation(..) and its dependencies.

    After calling the execute() method, an article is marked for translation so you can commit the translated article. I simply do this by giving the English-translated article the names Title_of_my_article/1/en and Title_of_my_article/en and commit them using the default MW API. (Be aware that 1/en marks the translated section that you commit, so you will commit the whole article just as a translated section)

    Sadly, the Translate extension is poorly documented so it is very hard to understand how things work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

write a script that takes two optional boolean arguments,--verbose‚ and ‚--live, and two required
I have to write a program that takes an Integer and converts it into
I am trying to write a script that converts an input's current value (int)
Response.Write(<script>alert('Konaklama Başarıyla Eklendi')</script>); string url = NewAccommodation.aspx?mID= + mID; Response.Redirect(url); Hi, on the above
I am working on a VERY simple script to clean up a few hundred
I have to write a litte daemon that can check multiple (could be up
Write C/C++/Java code to convert given number into words. eg:- Input: 1234 Output: One
I have a network storage device that contains a few hundred thousand mp3 files,
I got the following script for loading about hundred thousand .doc files and ran
So I'm trying to write a function that does the following: I have about

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.