Extension:BudouX

MediaWiki extensions manual
BudouX
Release status: stable
Implementation Skin , Locale
Description integrate Google BudouX to enable beautiful and readable line breaks for CJK languages.
Author(s) Kimagurenote (Corytalk)
Latest version 1.0.1
MediaWiki 1.25+
PHP 7.0+
License Apache License 2.0
Download https://kimagurenote.net/kn/BudouX#Download
https://kimagurenote.net/kn/BudouX#History
Example https://kimagurenote.net/kn/BudouX

The BudouX extension provides a way to integrate Google BudouX to enable beautiful and readable line breaks for CJK languages.

Installation edit

  • Download zip file from author's website, unzip it and place the file(s) in a directory called BudouX in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php file:
    /* Extension:BudouX */
    wfLoadExtension( 'BudouX' );
    /* select a value suitable for your contents */
    $wgBudouXLang = "ja";		// Japanese
    $wgBudouXLang = "zh-hans";	// Simplified Chinese
    $wgBudouXLang = "zh-hant";	// Traditional Chinese
    
  •   Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration edit

Languages edit

BudouX is supported for Japanese, Simplified Chinese and Traditional Chinese at this time.

You must set a language suitable for your contents.

  • ja - Japanese
  • zh-hans - Simplified Chinese
  • zh-hant - Traditional Chinese

Styles edit

(option) If you want to display text as justified, edit MediaWiki:Common.css on your server as follows. This is optional, you can fully customize it.

p, dd {
	text-align: justify;
}

Note: (MW 1.32+) You will need some permissions to edit Common.css, see: MediaWiki 1.32/interface-admin.

Exclude specified pages edit

(v1.0.1+)(option) If you want to exclude some pages, you can specify page names as follows. Case sensitive.

$wgBudouXExcludes = [ "Main Page", "Test Page" ];

Adapt specified tags edit

(v1.0.1+)(option) If you want to limit adapted tags, you can specify tag names as follows. Set as lower case.

$wgBudouXTags = [ "p", "dd" ];

If this variable not defined, will be used [ "p", "dd", "li" ] by default.

Limitations edit

This extension works in NS_MAIN or $wgContentNamespaces only.

This extension will not work in auto translated pages by Extension:SubTranslate.

This extension show no errors. It may be terminated quietly if meet some error.

BudouX may be conflicted with ‎<code> styles (background color).

This extension is not supported to load a custom model at this time. If you want to use a custom model, try to use Extension:Postscript to add the script.

See also edit