DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:uilanguage

UI Language Plugin

Compatible with DokuWiki

Rincewind

plugin Changes the user interface language to match the language of the current page

Last updated on
2017-11-23
Provides
Action
Repository
Source

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Similar to translation

Tagged with language

This plugin changes the wiki's user-interface language to match the language of the current page.

The following methods are used to find out which language to use:

  1. Metadata language, if set.
  2. The namespace, if it is a valid language code.
  3. The browser's prefered language.

The plugin handles the case when the language has been changed to a RTL language. In this case, RTL CSS is loaded instead of the “normal” (non-RTL) CSS.

If you are using the translate plugin, this plugin is useful.

If you are using the translation plugin (another plugin with a similar name) you don't need this plugin. That plugin has this behaviour built-in (except it doesn't use metadata for language).

Installation

Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.

Examples/Usage

If you have pages in multiple languages, there are two ways you can make the user-interface appear in the correct language:

  • You can use a language code as a namespace and use pagenames such as de:hallo.
  • You can use set the language metadata on the page. Metadata can be set using the meta plugin.

If you use the translate plugin, it sets the language metadata, so in this case you don't have to do anything.

If the language cannot be detected, the browser's prefered language will be used.

Development

Change Log

This plugin has been used in production since 2009-08-16.

Known Bugs and Issues

None.

ToDo/Wish List

  • Add a configuration setting to turn on/off setting the language by browser language.
  • Verify compatibility with the latest version of DokuWiki.
  • Ability to have different 'Navigation', 'Tool' and 'Site_notice' pages for each detecting language.

Discussion

plugin/uilanguage.txt · Last modified: 2020-02-23 14:45 by Aleksandr

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki