buildrelease
[openafs-wiki.git] / TWiki / VarLANGUAGES.mdwn
diff --git a/TWiki/VarLANGUAGES.mdwn b/TWiki/VarLANGUAGES.mdwn
new file mode 100644 (file)
index 0000000..33ef3d1
--- /dev/null
@@ -0,0 +1,48 @@
+<a name="VarLANGUAGES"></a>
+
+### <a name="LANGUAGES -- list available TWik"></a> LANGUAGES -- list available TWiki languages
+
+- List the languages available (as `PO` files) to TWiki. Those are the languages in which TWiki's user interface is available.
+- Syntax: `%LANGUAGES{...}%`
+- Supported parameters: <table border="1" cellpadding="0" cellspacing="0">
+  <tr>
+    <th bgcolor="#99CCCC"><strong> Parameter: </strong></th>
+    <th bgcolor="#99CCCC"><strong> Description: </strong></th>
+    <th bgcolor="#99CCCC"><strong> Default: </strong></th>
+  </tr>
+  <tr>
+    <td><code>format</code></td>
+    <td> format for each item. See below for variables available in the format string. </td>
+    <td><code>"   * $langname"</code></td>
+  </tr>
+  <tr>
+    <td><code>separator</code></td>
+    <td> separator between items. </td>
+    <td><code>"\n"</code> (newline) </td>
+  </tr>
+  <tr>
+    <td><code>marker="selected"</code></td>
+    <td> Text for <code>$marker</code> if the item matches <code>selection</code></td>
+    <td><code>"selected"</code></td>
+  </tr>
+  <tr>
+    <td><code>selection="%LANGUAGE%"</code></td>
+    <td> Current language to be selected in list </td>
+    <td><code>(none)</code></td>
+  </tr>
+</table>
+- `format` variables: <table border="1" cellpadding="0" cellspacing="0">
+  <tr>
+    <th bgcolor="#99CCCC"><strong> Variable </strong></th>
+    <th bgcolor="#99CCCC"><strong> Meaning </strong></th>
+  </tr>
+  <tr>
+    <td><code>$langname</code></td>
+    <td> language's name, as informed by the translators </td>
+  </tr>
+  <tr>
+    <td><code>$langtag</code></td>
+    <td> language's tag. Ex: <code>en</code>, <code>pt-br</code>, etc. </td>
+  </tr>
+</table>
+- Example: `<select>%LANGUAGES{format="<option $marker value='$langtag'>$langname</option>" selection="%LANGUAGE%"}%</select>` creates an option list of the available languages with the current language selected