plugin:translation
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:translation [2015-06-30 17:14] – [Installation] Sugg2: "must not" -> "you need not" 213.61.229.77 | plugin:translation [2023-12-14 23:50] (current) – version upped andi | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Translation Plugin ====== | ====== Translation Plugin ====== | ||
- | |||
---- plugin ---- | ---- plugin ---- | ||
description: | description: | ||
Line 6: | Line 5: | ||
email : andi@splitbrain.org | email : andi@splitbrain.org | ||
type : syntax, action | type : syntax, action | ||
- | lastupdate : 2015-05-22 | + | lastupdate : 2023-12-14 |
- | compatible : Angua,Adora Belle,Hrun | + | compatible : Angua, Adora Belle, Hrun, Frusterick Manners, Greebo, Hogfather |
depends | depends | ||
conflicts | conflicts | ||
similar | similar | ||
- | tags : language | + | tags : language, translation |
downloadurl: | downloadurl: | ||
Line 19: | Line 18: | ||
---- | ---- | ||
- | This plugin shows a list of available translations for a page. It is very simple and was built with the needs of www.dokuwiki.org in mind and is used for documentation translation efforts here. There are a few limitations: | + | This plugin shows a list of available translations for a page. It is very simple and was built with the needs of [[: |
* separate namespaces are used to store translations | * separate namespaces are used to store translations | ||
Line 26: | Line 25: | ||
===== Download ===== | ===== Download ===== | ||
- | Use the download link given above to download the file manually or through | + | Search and install |
==== Changes ==== | ==== Changes ==== | ||
Line 34: | Line 32: | ||
===== Installation ===== | ===== Installation ===== | ||
- | - Download | + | - Search |
- Configure it through the [[plugin: | - Configure it through the [[plugin: | ||
- Add the following code in your template' | - Add the following code in your template' | ||
Line 59: | Line 57: | ||
- no pages in the top namespace and all languages in sub namespaces | - no pages in the top namespace and all languages in sub namespaces | ||
- | Here at dokuwiki.org the first method is used. Certain features OTOH will only work with second method. | + | Here at dokuwiki.org the first method is used. Certain features OTOH will only work with the second method. |
There are several config options, all accessible through the config manager. | There are several config options, all accessible through the config manager. | ||
- | The most important thing to configure is a list of languages you want to use in the '' | + | The most important thing to configure is a list of languages you want to use in the '' |
- for the default language in the top namespace, omit it from the config | - for the default language in the top namespace, omit it from the config | ||
Line 70: | Line 68: | ||
By default a list of translation links is shown. This can take quite a bit space when you have many translations. Enabling the '' | By default a list of translation links is shown. This can take quite a bit space when you have many translations. Enabling the '' | ||
- | If you want to restrict translations to a certain namespace you can define it in the '' | + | If you want to restrict translations to one certain namespace you can define it in the '' |
Similar to the above setting you can also disable translations for certain pages or namespaces using the '' | Similar to the above setting you can also disable translations for certain pages or namespaces using the '' | ||
+ | |||
+ | If you want to switch on the translation flag only for specific namespaces, you can do this by defining a regular expression that inverts the result, for example\\ | ||
+ | '' | ||
+ | Then only in the namespaces " | ||
You can optionally choose to let the plugin translate the whole user interface of DokuWiki too when a non-default language page is selected. Just enable the '' | You can optionally choose to let the plugin translate the whole user interface of DokuWiki too when a non-default language page is selected. Just enable the '' | ||
Line 119: | Line 121: | ||
Usability experts agree that using country flags to represent a language is a really bad idea and should be avoided at all costs. This is because languages do not correspond to single countries. | Usability experts agree that using country flags to represent a language is a really bad idea and should be avoided at all costs. This is because languages do not correspond to single countries. | ||
- | Simple example: what flag should represent English? The flag of England (red cross on white), the British flag (Union Jack) or the flag of the United states (Star-spangled banner)? Or what language would you expect when you see the Swiss flag? French? German? Rheto-Romanic? | + | Simple example: what flag should represent English? The flag of England (red cross on white), the Union Flag (aka "Union Jack") for the UK or the flag of the United states (Stars and stripes)? Or what language would you expect when you see the Swiss flag? French? German? Rheto-Romanic? |
I added support for flags because of the high demand for it but I strongly advise against using it. If you do, remember that your choice of flags will most probably annoy one group of your users, regardless what you chose. | I added support for flags because of the high demand for it but I strongly advise against using it. If you do, remember that your choice of flags will most probably annoy one group of your users, regardless what you chose. | ||
- | Please note that flag support isn't 100% working when using the '' | + | New flags can be placed in SVG format |
- | + | ||
- | New flags can be place in the '' | + | |
===== Namespace template variables ===== | ===== Namespace template variables ===== | ||
- | The translation plugin | + | The translation plugin |
^ Variable ^ Description ^ Example ^ | ^ Variable ^ Description ^ Example ^ | ||
| @LANG@ | Language you have entered in your [[config: | | @LANG@ | Language you have entered in your [[config: | ||
Line 135: | Line 135: | ||
- | ===== Old translation warning based on ACL ===== | ||
- | |||
- | I use translation for a public website, and would like a means to only show old translations only to registered users: As I also use the publish plugin, the translation page shows the "old translation" | ||
- | |||
- | I am using an ugly hack now, which works, but would very much welcome a proper and maintainable implementation in the future. | ||
- | |||
- | |||
- | ===== Loading language selector ===== | ||
- | |||
- | Would be great if the language selector could be loaded without modifying the template (and losing the changes with the next update and then trying hard to remember where you added it the last time). Don't know if there' |
plugin/translation.1435677276.txt.gz · Last modified: 2015-06-30 17:14 by 213.61.229.77