Extension:PerPageLanguage
PerPageLanguage Release status: stable |
|
---|---|
Implementation | MyWiki |
Description | Changes the localized interface messages based on which language the page is set as. |
Author(s) | Vedmaka |
Maintainer(s) | WikiTeq team |
Latest version | 1.0.0 (June 2021) |
Compatibility policy | For every MediaWiki release that is a Long Term Support release there is a corresponding branch in the extension. |
MediaWiki | 1.35, 1.39 |
Database changes | No |
License | GNU General Public License 2.0 |
Download | |
|
|
Quarterly downloads | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
Public wikis using | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
Translate the PerPageLanguage extension if it is available at translatewiki.net | |
Issues | Open tasks · Report a bug |
The PerPageLanguage extension allows a multi-lingual wiki to display each page in the same language as its contents.
It allows for the page's defined content language, a feature built into MediaWiki, to also define what language the user interface should use.
Unlike UniversalLanguageSelector, it changes the language used for the user interface based on the page's content language, not what the user selects.
This extension can be thought of as using ?uselang=
based on the page content language.
(For more information on the difference between user interface language and page content language, see Manual:Language.)
This extension was created for WikiWorks.
Usage
A page's content language can be defined at Special:PageLanguage if $wgPageLanguageUseDB is set to true. If this is defined, then PerPageLanguage will change the user interface language to match the page content language for anyone who navigates to that page.
Download
<translate> The extension can be retrieved directly from Git</translate> [?]:
- <translate> Browse code</translate>
- <translate> Some extensions have tags for stable releases.</translate>
- <translate> Browse tags</translate>
- <translate> Select the tag</translate>
- <translate> Click "snapshot"</translate>
- <translate> Each branch is associated with a past MediaWiki release.</translate> <translate> There is also a "master" branch containing the latest alpha version (might require an alpha version of MediaWiki).</translate>
- <translate> Browse branches</translate>
- <translate> Select a branch name</translate>
- <translate> Click "<tvar name=1>⧼extdist-submit-version⧽</tvar>"</translate>
<translate> Extract the snapshot and place it in the <tvar name=name>extensions/PerPageLanguage/</tvar> directory of your MediaWiki installation.
If you are familiar with Git and have shell access to your server, you can also obtain the extension as follows: </translate>
cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/PerPageLanguage.git
Installation
- <translate> [[<tvar name=2>Special:ExtensionDistributor/PerPageLanguage</tvar>|Download]] and move the extracted <tvar name=name>
PerPageLanguage
</tvar> folder to your <tvar name=ext>extensions/
</tvar> directory.</translate>
<translate> Developers and code contributors should install the extension [[<tvar name=git>Special:MyLanguage/Download from Git</tvar>|from Git]] instead, using:</translate>cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/PerPageLanguage - <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php </tvar> file:</translate>
wfLoadExtension( 'PerPageLanguage' ); $wgPageLanguageUseDB = true; $wgGroupPermissions['sysop']['pagelang'] = true;
- Configure as required
- File:OOjs UI icon check-constructive.svg <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>
Configuration
$wgPerPageLanguageIgnoreUserSetting
- If true, disregards the language chosen by the user's own preferences and forces the page to be displayed in the same language as the page content language.
See also
- Extension:UniversalLanguageSelector
- Extension:MultiLanguageManager - An extension with similar goals
- Pages with script errors
- Pages with broken file links
- Extensions by WikiTeq
- Stable extensions
- Extensions without an image
- Personalization extensions
- Extensions with long-term support release branches compatibility policy
- Extensions with manual MediaWiki version
- GPL licensed extensions
- Extensions in Wikimedia version control
- UserGetLanguageObject extensions
- All extensions