PageRenderTime 39ms CodeModel.GetById 23ms app.highlight 13ms RepoModel.GetById 1ms app.codeStats 0ms

#! | 89 lines | 58 code | 31 blank | 0 comment | 0 complexity | 48357892f9df830674ac2a1432bc6e97 MD5 | raw file
 1## Please edit system and help pages ONLY in the master wiki!
 2## For more information, please see MoinMoin:MoinDev/Translation.
 5#acl -All:write Default
 6#format wiki
 7#language en
 8= Welcome =
10||<tablewidth="99%" (> (./) /!\ <!> ||<: width="76%">If you have just upgraded your wiki you are not in the wrong place.<<BR>>You have to make a configuration decision which affects {{{}}}.||<)> <!> /!\ (./) ||
12This page describes customizing MoinMoin's language support.  New visitors to your wiki can be presented with a front page in their preferred language, or they can be forced to use the page you specify.  You can also lock down the language used for translated pages and phrases within your wiki.
14First go to SystemPagesSetup and unpack the system and help page packages for any language you want to support.
16After that, just read the text below, decide which way you want to go and change your configuration.
18For the impatient (you '''must''' set `page_front_page` to get rid of this page being the front page):
19## Translator notice: please translate MyStartingPage to your language.
21    # choose this, if most wiki content is in a single language
22    page_front_page = u"MyStartingPage"
25## Translator notice: do NOT translate FrontPage to your language.
27    # choose this, if wiki content is maintained in multiple languages
28    page_front_page = u"FrontPage"
31## Translator notice: please DO translate FrontPage to your language.
32If you go the ''single language'' way, you can copy some of the content of FrontPage to the page you choose as your `page_front_page`.  Alternatively, if you have the ''rename'' action turned on in your wiki, you can rename your FrontPage to another name, then assign that name (for example, '''Welcome''') to your 'page_front_page' variable.
34## Translator notice: do NOT translate FrontPage to your language.
35If you go the ''multiple language'' way, don't forget to edit all translations of FrontPage.
37/!\ If you go the ''multiple languages'' way, people reaching your wiki will be directed to the front page corresponding to their browser language setting. If you did not prepare that page, they will see the default page for their language and have the impression the wiki is empty or badly maintained.
39= User interface texts and language_default =
41MoinMoin tries to adapt the user interface to the language the user prefers.
43If the user puts a specific language preference into his user preferences, that language will be used for the user interface. But the user doesn't even need to do that if he already has configured his browser with his language preferences.
45If there is no specific user preferences language setting, moin tries to adapt to the languages the user configured in his browser. So if the browser tells moin that its preference is Canadian English, then German, then English in general and moin has German and English available (but not a specific configuration for Canadian English), then the user will get a German user interface.
47If there is no common language in the user's browser configuration and in moin or if you have set {{{language_ignore_browser = True}}}, moin will fall back to using what is configured as language_default. This is also the case if the user's browser does not specify any language.
49The usual case when you want to set {{{language_ignore_browser = True}}} is when running a local wiki with no international audience and you maintain the wiki in only one (your local) language. Don't forget to specify your one-and-only language using language_default when doing this.
51= System pages, including FrontPage =
53The MoinMoin distribution archive contains the system pages (like `RecentChanges`) in different languages (see SystemPagesGroup), selecting the correct language in the same way as for the user interface.
55For example, if the navi_bar contains a link to `FrontPage`, moin will first look for a translation of `FrontPage` into the user's language. So if the user's language is German (de), we obtain the German translation of `FrontPage`, which is `StartSeite`. (Internally, moin uses `MoinMoin/i18n/` for that, which is automatically generated out of `de.po`,) Moin will use `StartSeite` if that page actually exists; otherwise, it will fall back to using `FrontPage`.
57This is fine if you want to have a FrontPage and translations of it. But what to do if you don't want that?
59Either delete any translated page of FrontPage - they will only be used '''if they exist'''. Or simply use the `page_front_page` configuration variable to choose something different from `FrontPage` as your front page, e.g. `MyProject`. Moin will then try to look up a translation for `MyProject`, but usually won't find any - and thus simply use `MyProject` no matter what language the user prefers.
61= Built-in vs. user-specified translations =
63MoinMoin normally uses built-in translation (see `MoinMoin/i18n/*`) for translating user interface text and system page names in navi_bar.
65But there is the possibility to customize navi_bar with your own stuff. Moin has no built-in translation for that usually, so what to do if you want to have them translated the same way as `FrontPage` usually is?
67Simply create some pages like `GermanDict`, `FrenchDict`, `Simplified_ChineseDict` etc. (use the english name of the language) and put a definition list on them which defines the translations for the English terms, e.g. on page `GermanDict`:
69 MyProject:: MeinProjekt
70 LatestNews:: NeuesteNachrichten
73(!) Note the space before the lines. If you do not put that space, Moin will not consider the entries as dictionnary entries. See MoinMoin:WikiDict for details.
75Moin then will use those dict pages if it can't find the text in its built-in translation dictionaries.
77= How to specify the page language =
79It is highly recommended to specify the page language in the page header like this:
82#language he
85The language name is the iso-639-1 name of the language. Languages that moin does not support are ignored.
87This is critical if the wiki contains content in different directions, like Hebrew pages, which should display in right to left direction, and English pages, which should display in left to right direction.
89In the past, system pages had a language comment: {{{##language:en}}}. This comment has no effect, and should be changed to the new {{{#language en}}} format. To repair old pages in your wiki, run {{{}}} in your wiki data directory. Back up your wiki data directory before doing this!