![]() Release status: unmaintained |
|
---|---|
Implementation | Parser function |
Description | Show the translated pages list |
Author(s) | Omar Vega Ramos (ovrunitalk) |
Latest version | 0.1.0 |
MediaWiki | 1.18+ |
License | GNU Affero General Public License 3.0 or later |
Download | https://notabug.org/ovruni/mediawiki-translatedpages |
Hooks used
|
|
What can this extension do?
This extension allows to synchronize translation pages, using a base page that can be in English or in another language.
Usage
Synchronize translations
- Create the page source. For example: Page
- To define a base page, add the following code at the beginning of the first line: {{#TranslatedPages:}}
Example:Example from screen to define page base
- To define a base page, add the following code at the beginning of the first line: {{#TranslatedPages:}}
- Create the page to be translated into another language by following this format: $lang:Page , where $lang is the language code according to ISO 639 and with initial capital letters. For example: Es:Page, Fr:Page, etc.
- To synchronize with any version of the page base, place the following code at the beginning of the first line: {{#TranslatedPages:revision=$num}}
Example:Example from screen to define translated page- Where $num is the corresponding revision number of the base Page (revision numbers appear in the page history).
Example:Version number in history page
- Where $num is the corresponding revision number of the base Page (revision numbers appear in the page history).
- You can add the parameter outdated on the translated page to place a warning.
Example:Example of the "outdated" warning
- To synchronize with any version of the page base, place the following code at the beginning of the first line: {{#TranslatedPages:revision=$num}}
Menu
- The menu with the list of available pages in another language for any page can be displayed in two ways: either in the sidebar or the top bar.
- The difference will be shown in the menu when the pages are not synchronized. The number on the right is the version of the page base, the number on the left is $num.

Version number in history page
Show Status
- To see the status table of translated pages (those that include {{#TranslatedPages:}}) should use the following code: {{#TranslatedPages:showstatus}} in any page.
Download instructions
The source code can be downloaded via git:
$ git clone git://notabug.org/ovruni/mediawiki-translatedpages.git
Installation
To install this extension, add the following to LocalSettings.php:
#add configuration parameters here
#setup user rights here
require_once("$IP/extensions/TranslatedPages/TranslatedPages.php");
Configuration parameters
- Choose language base of articles, e.g. 'en', 'es', etc.:
$wgTranslatedPagesSourceLanguage = 'en';
- Choose location of the languages bar, e.g. 'sidebar', 'topbar':
$wgTranslatedPagesLanguagesBar = 'sidebar';
- Choose status colors:
$wgTranslatedPagesColorsStates = array('error' => '#FF0000', 'outdated' => '#FFFF00', 'updated' => '#008000', 'missing' => '#808080');
See also
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.