]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/plugins/po.mdwn
PO plugin: document how pages can be renamed using the VCS.
[ikiwiki.git] / doc / plugins / po.mdwn
index da58a9f49e632ced500429fad448b69689d3e4c8..de69ad379d0714b9d8e8454c8a4a2ff776c6193a 100644 (file)
@@ -49,15 +49,15 @@ Supported languages
 `po_master_language` is used to set the "master" language in
 `ikiwiki.setup`, such as:
 
-        po_master_language => { 'code' => 'en', 'name' => 'English' }
+        po_master_language: en|English
 
 `po_slave_languages` is used to set the list of supported "slave"
 languages, such as:
 
-        po_slave_languages => [ 'fr|Français',
-                                'es|Español',
-                                'de|Deutsch',
-        ]
+        po_slave_languages:
+         - fr|Français
+         - es|Español
+         - de|Deutsch
 
 Decide which pages are translatable
 -----------------------------------
@@ -117,12 +117,13 @@ serve any page in the client's preferred language, if available.
 
 Add 'Options MultiViews' to the wiki directory's configuration in Apache.
 
-When `usedirs` is enabled, one has to set `DirectoryIndex index` for
-the wiki context.
+When `usedirs` is enabled, you should also set `DirectoryIndex index`.
 
-Setting `DefaultLanguage LL` (replace `LL` with your default MIME
-language code) for the wiki context can help to ensure
-`bla/page/index.en.html` is served as `Content-Language: LL`.
+These settings are also recommended, in order to avoid serving up rss files
+as index pages:
+
+       AddType application/rss+xml;qs=0.8 .rss
+       AddType application/atom+xml;qs=0.8 .atom
 
 For details, see [Apache's documentation](http://httpd.apache.org/docs/2.2/content-negotiation.html).
 
@@ -149,6 +150,9 @@ the wiki homepage.
 The `ISTRANSLATION` and `ISTRANSLATABLE` variables can be used to
 display things only on translatable or translation pages.
 
+The `LANG_CODE` and `LANG_NAME` variables can respectively be used to
+display the current page's language code and pretty name.
+
 ### Display page's versions in other languages
 
 The `OTHERLANGUAGES` loop provides ways to display other languages'
@@ -225,6 +229,14 @@ are not rendered correctly on the slave pages:
   could be used to support it, but it would need a security audit
 * other markup languages have not been tested.
 
+Renaming a page
+---------------
+
+A translatable page may be renamed using the web interface and the
+[[rename plugin|doc/plugins/rename]], or using the VCS directly; in
+the latter case, *both* the "master" page and every corresponding
+`.po` file must be renamed in the same commit.
+
 Security
 ========