<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>HelpOnDictionaries</title></articleinfo><section><title>Dictionaries</title><para><!--The macro TableOfContents doesn't work with the DocBook formatter.--> A dictionary is a simple data structure that maps a dictionary name to a set of key/value pairs. It can be used e.g. to provide additional translations. </para><para>The dictionary name usually is something like <code>GermanDict</code> (some word ending with <code>Dict</code>). This default pattern can be changed (e.g. for non-english languages etc.), see page_dict_regex on <ulink url="http://id3.org/HelpOnDictionaries/HelpOnConfiguration#">HelpOnConfiguration</ulink>. </para><para>The dict members are key/value pairs (both unicode strings). </para><section><title>Wiki Dicts</title><section><title>Defining them</title><para>You can create a dict definition for a dict named <code>GermanDict</code> by creating a page called <code>GermanDict</code> with this content: </para><screen><![CDATA[#format wiki
This translates some words from English to German:
 dog:: Hund
 cat:: Katze
 mouse: Maus]]></screen><para>Important: </para><itemizedlist><listitem><para>Dict members have to be on a first-level definition list (see <ulink url="http://id3.org/HelpOnDictionaries/HelpOnLists#">HelpOnLists</ulink>). </para><itemizedlist><listitem><para><inlinemediaobject><imageobject><imagedata depth="16" fileref="http://id3.org/moin_static199/moniker/img/alert.png" width="16"/></imageobject><textobject><phrase>/!\</phrase></textobject></inlinemediaobject> The leading space and the space after '::' are important. </para></listitem></itemizedlist></listitem><listitem><para>Everything else (other text, second-level items, etc.) is ignored. </para></listitem></itemizedlist></section><section><title>Using them</title><section><title>Translation</title><para><ulink url="http://id3.org/HelpOnDictionaries/MoinMoin#">MoinMoin</ulink> uses <code>&lt;Language&gt;Dict</code> additionally to the builtin gettext based translations. E.g. if it wants to translate <code>cat</code> to German and doesn't find it in the .po file, it will try to look it up on <code>GermanDict</code> (and find <code>Katze</code> there, see the example above). </para></section><section><title>Variables</title><para>See also <ulink url="http://id3.org/HelpOnDictionaries/HelpOnVariables#">HelpOnVariables</ulink>. </para></section></section><section><title>Protecting them</title><para>You can use ACLs as usual to protect your dict pages. </para></section></section><section><title>Other ways to define dicts / access dict definitions</title><para>MoinMoin can also use dict definitions from other sources, but this needs to be configured in your wiki config. See <code>dicts</code> on <ulink url="http://id3.org/HelpOnDictionaries/HelpOnConfiguration#">HelpOnConfiguration</ulink>. </para></section></section></article>