Extension:Ascii Translit
From MediaWiki.org
| The author of this extension is no longer maintaining it! Meaning any reports for additional features and/or bugfixes will more than likely be ignored. Volunteers are encouraged to take on the task of developing and maintaining it. As a courtesy, you may want to contact the author. You should also remove this template and list yourself as maintaining the extension in the page's {{extension}} infobox. |
|
Ascii Translit Extension Release status: experimental |
|
|---|---|
| Implementation | Page action |
| Description | Human readable URL while title contains non-Ascii chars. |
| Author(s) | User:Vitas |
| Last version | 0.0.4 |
| MediaWiki | created on 1.6.8 |
| Database changes | no |
| License | No license specified |
| Download | .tgz |
| Check usage and version matrix | |
When article title contains non-ascii characters, they apear in URL as urlencoded, (i.e. Těžiště (centroid in Czech) is T%C4%9B%C5%BEi%C5%A1t%C4%9B), which is not so easy to read. AsciiTranslitExtension allows you to use Ascii aproximation (or so called transliteration) in URL, and nonASCII in titles (at the same time). So article Těžiště will be Teziste in URL.
Hack is done by adding coresponding #redirect pages, and translate some types of links.
'Redirected from' message can be suppresed.
Contents |
Installation [edit]
- Untar AsciiTranslitExtension.php to /extensions/ directory.
- Note that the file type for the download is wrong. The download box has .tgz and the file downloaded has .gz, but the file contents are really that of an uncompressed .php file. Rename the file after downloading.
- Add this to LocalSettings.php:
require_once( "extensions/AsciiTranslitExtension.php");
Configuration [edit]
- $wgAsciiTranslitExtensionHideRedir -- boolean; true -- suppres 'Redirected from *' message for transliterated pages (default: false).
- $wgAsciiTranslitExtensionHack -- boolean; True lead to not to use iconv for transliteration, when it does not work. It use str_replace, and it translits only few UTF-8 characters (now only Latin characters are supported) (can be easily extended) (default: false).
- $wgAsciiTranslitExtensionNS -- boolean; translit also spacename names (default: true).
Note: set these variables before 'require_once '.
Bugs [edit]
- When added to non empty wiki, redirections to existing pages are not created.
- When there is collision (two pages have the same transliteration), links are generated incorrectly.
- Only main namespace is transliterated.
- Probably more, tell me...
changelog [edit]
- 0.0.4 bad utf8 chars used in cyrillic, fixed
- 0.0.3 Cyrillic support added, but I'm not from russia so i'm not sure about some characters. Especially hard and soft sign.
Who's using it? [edit]
Please add your wiki here! Add it to the top, and feel free to add a link to your favorite article or two.
- wiki.maxthon.cz - simple modified to using Czech chars