Extension:PerPageLanguage

This page is a translated version of the page Extension:PerPageLanguage and the translation is 78% complete.
Other languages:
MediaWiki扩展手冊
OOjs UI icon advanced-invert.svg
PerPageLanguage
發布狀態: 穩定版本
实现 我的wiki
描述 依據設定的頁面語言更改本地化界面消息語言。
作者 Vedmaka
维护者 WikiTeq team
最新版本 1.0.0 (2021年6月)
兼容性政策 For every MediaWiki release that is a Long Term Support release there is a corresponding branch in the extension.
MediaWiki 1.35+
数据庫更改
许可协议 GNU通用公眾授權條款2.0
下載
  • $wgPerPageLanguageIgnoreUserSetting
翻譯PerPageLanguage扩展,若在translatewiki.net可用

检查使用和版本矩阵。

問題 尚未完成的工作 · 报告錯誤

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.

用法

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.

下載

此扩展可直接从Git检索到 [?]:

  • 浏览代码
  • 部分扩展有稳定版本标签。
  • 每个分支与过去的MediaWiki发布版本相关联。 这里也有一个“主线”分支,包含最新alpha版本(可能需要MediaWiki的alpha版本)。

提取快照,并将它放置在您的MediaWiki安装副本的extensions/PerPageLanguage/目录中。

如果您对git熟悉,并且拥有您服务器的shell访问权,您也可以通过以下方法获得扩展:

cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/PerPageLanguage.git

安裝

  • 下载文件,并将其放置在您extensions/文件夹中的PerPageLanguage目录内。
  • 将下列代码放置在您的LocalSettings.php 的底部:
    wfLoadExtension( 'PerPageLanguage' );
    $wgPageLanguageUseDB = true;
    $wgGroupPermissions['sysop']['pagelang'] = true;
    
  • Configure as required
  •   完成 – 在您的wiki上导航至Special:Version,以验证已成功安装扩展。

配置

  • $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.

參見

  This extension is professionally maintained by the WikiTeq team.