summaryrefslogtreecommitdiff
path: root/doc/plugins
diff options
context:
space:
mode:
authorwww-data <www-data@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-08-21 18:29:28 +0000
committerwww-data <www-data@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-08-21 18:29:28 +0000
commitad07eebb0b4afe4af8170dedefb9b782f3ab2d98 (patch)
tree7c21738fbe49fd9c2b157435adb3f7871e9174b9 /doc/plugins
parent410d9a41b793c3ceaef44847fde9f8b0501231b9 (diff)
web commit by JordaPolo: Added linguas plugin.
Diffstat (limited to 'doc/plugins')
-rw-r--r--doc/plugins/contrib/linguas.mdwn68
1 files changed, 68 insertions, 0 deletions
diff --git a/doc/plugins/contrib/linguas.mdwn b/doc/plugins/contrib/linguas.mdwn
new file mode 100644
index 000000000..6dcffffc8
--- /dev/null
+++ b/doc/plugins/contrib/linguas.mdwn
@@ -0,0 +1,68 @@
+Linguas
+=======
+
+Linguas is a plugin for [ikiwiki](http://ikiwiki.kitenet.net/) that
+allows translations of wiki pages.
+
+Download: [linguas.pm](http://wiki.ettin.org/files/linguas.pm) (2006-08-21).
+
+Usage
+-----
+
+Translatable pages and translations must have the following format:
+`pagename.$LANG`, where `$LANG` is a ISO639-1 (two-letter) language code.
+To enable linguas, add the following line in the source code of the page:
+
+ [[linguas ]]
+
+Note that linguas is only required in one of the pages (the original,
+for instance); the rest of translations will be automatically
+updated. Additionally, it is also possible to specify the title of
+the translation:
+
+ [[linguas title="Translated title"]]
+
+
+Template
+--------
+
+This is the template code that should be added to `templates/page.tmpl`:
+
+ <TMPL_IF NAME="LINGUAS">
+ <div id="linguas">
+ <p class="otherlinguas"><TMPL_VAR NAME="OTHERLINGUAS"></p>
+ <ul>
+ <TMPL_LOOP NAME="LINGUAS">
+ <li><TMPL_VAR NAME=LINK></li>
+ </TMPL_LOOP>
+ </ul>
+ </div>
+ </TMPL_IF>
+
+
+TODO/Known Problems
+-------------------
+
+* The current language list only contains 4 languages (ca, de, en,
+es), and is "hardcoded" in linguas.pm. Would be interesting to define
+it in ikiwiki.setup, though some problems were found while trying to do
+so. (Actually, defining hash-like arguments from the command like works
+fine, but it fails from ikiwiki.setup.)
+
+* Wiki links to other translated pages require the full page name
+including the `.$LANG`. It should be possible to link automatically
+to pages with the same `.$LANG`, but that would probably require some
+changes in IkiWiki. (I'm not sure though, I still haven't looked at
+it... any hints?)
+
+
+Examples
+--------
+
+* [Linguas](http://wiki.ettin.org/linguas.en.html). A page with the same
+content than this one.
+
+* [Hello in some languages](http://wiki.ettin.org/hello/hello.en.html). The
+translations were taken from [Hello in many
+languages](http://www.omniglot.com/language/phrases/hello.htm) and from
+the [Debian](http://www.debian.org/) website.