Extension:LocalisationUpdate
LocalisationUpdate Release status: stable |
|
---|---|
Implementation | Database |
Description | Allows to keep the localized messages as up to date as possible |
Author(s) | Tom Maaswinkel (12wiki), Niklas Laxström (maintainer) |
Latest version | 1.4.0 (2016-10-13) |
Compatibility policy | master |
MediaWiki | 1.30+ |
Database changes | No |
License | GNU General Public License 2.0 or later |
Download | Included in Language Extension Bundle
Readme |
Example | Wikipedia |
Translate the LocalisationUpdate extension if it is available at translatewiki.net | |
Check usage and version matrix. | |
Issues | Open tasks · Report a bug |
The LocalisationUpdate extension allows to update the localizations for MediaWiki messages at any time, without needing to upgrade the MediaWiki software.
Contents
Installation[edit]
- Download and place the file(s) in a directory called
LocalisationUpdate
in yourextensions/
folder.
- Add the following code at the bottom of your LocalSettings.php:
wfLoadExtension( 'LocalisationUpdate' ); $wgLocalisationUpdateDirectory = "$IP/cache";
- Create a
cache
folder in the installation directory, and be sure the server has permissions to write on it. Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Configuration[edit]
$wgLocalisationUpdateDirectory[edit]
Directory to store cache files in, if not set then it uses default $wgCacheDirectory . LocalisationUpdate requires some place to store files in to work; if neither $wgLocalisationUpdateDirectory nor $wgCacheDirectory is set, LocalisationUpdate's update.php script will not work.
$wgLocalisationUpdateDirectory is set to false by default.
$wgLocalisationUpdateRepository[edit]
Default repository source to fetch translation. GitHub is set to default repository. This is added with version 1.1.
$wgLocalisationUpdateRepositories[edit]
Array of repositories URLs from which to retrieve localisations for core MediaWiki and extensions. Default is set to GitHub's MediaWiki Git repositories and you should not change this unless you know what you're doing. This is added with version 1.1.
Example for using github
$wgLocalisationUpdateRepositories['github'] = array( 'mediawiki' => 'https://raw.github.com/wikimedia/mediawiki/master/%PATH%', 'extension' => 'https://raw.github.com/wikimedia/mediawiki-extensions-%NAME%/master/%PATH%', 'skin' => 'https://raw.github.com/wikimedia/mediawiki-skins-%NAME%/master/%PATH%' );
Example for local filesystem configuration
$wgLocalisationUpdateRepositories['local'] = array( 'mediawiki' => 'file:///resources/projects/mediawiki/master/%PATH%', 'extension' => 'file:///resources/projects/mediawiki-extensions/extensions/%NAME%/%PATH%', 'skin' => 'file:///resources/projects/mediawiki-skins/skins/%NAME%/%PATH%' );
Usage[edit]
Whenever you want to run an update, run php extensions/LocalisationUpdate/update.php
on the command line, or set up a cron job.
If you are on a unix-like system, you should add LocalisationUpdate to crontab:
crontab -e # Add the following line @daily php /path/to/your/wiki/extensions/LocalisationUpdate/update.php --quiet
php maintenance/rebuildLocalisationCache.php --force
.Script parameters[edit]
--repoid
: Fetch translations from repositories identified by this
See also[edit]
- Localisation
- Technical details about how this runs on Wikimedia projects.
![]() | This extension is being used on one or more Wikimedia projects. This probably means that the extension is stable and works well enough to be used by such high-traffic websites. Look for this extension's name in Wikimedia's CommonSettings.php and InitialiseSettings.php configuration files to see where it's installed. A full list of the extensions installed on a particular wiki can be seen on the wiki's Special:Version page. |