One or more language packs must be installed on new wikis.
MoinMoin can be configured to use the language(s) you want (and only this/those languages). As a side effect, it means that moinmoin comes with no single language installed by default.
Language setup in moinmoin
Beside your wiki content, the following language can be provided in different languages:
MoinMoin theme internationalization (especially, the links like Edit, Info...)
MoinMoin system pages (like FrontPage, RecentChanges...)
MoinMoin help pages (like HelpOnMoinWikiSyntax, default categories and default template (like HomepageTemplate).
MoinMoin administrator pages
It is usually sensible to only enable moinmoin internationalization for the languages in which you provide some content. (If you only provide content in German, there is little chance that a visitor is interested in help pages and action buttons in a different language).
Single/Multiple language
Multiple languages is MoinMoin's default configuration. You just have to install some language packs and edit the FrontPage in each of these languages. Also, make sure that our wiki configuration contains this line:
# For multi-languages wikis, the front-page must be named "FrontPage" # so the best language is negotiation, based on the visitor's preference. page_front_page = u"FrontPage" # Configure your wiki default language (see HelpOnConfiguration). language_default = 'en'
Single language wiki needs a little bit more configuration.
Install the all_pages pack for that language.
- language_ignore_browser
Force the front-page name, you can use anything, except FrontPage (especially if you installed language-packs for more that one language)
# Name of the wiki frontpage (Unless `language_ignore_browser` is set to True, # the value "FrontPage" is special: Visitors are redirected to the FrontPage # in their language, if it exists) page_front_page = u"MyStartingPage" # Configure your wiki language (see HelpOnConfiguration). language_default = 'en' # Ignore visitors' preference language_ignore_browser = True
Installing language packs
Becoming superuser
For installation of the language packages, it is required that you are superuser:
- If you do not already have an account, create one (see hints on the login page).
- If the wiki is not already configured to recognize you as a superuser, change wiki config appropriately:
superuser = [u"YourLoginName", ]
See HelpOnConfiguration for more details.
- Restart the wiki to make it load the changed configuration.
- Login in (with the login name you configured as superuser).
Installing page packages
You can install help and system page packages for any language you want to support for your wiki users. You should see links for each supported language, and below an install link for each page package of that language - click on it for each of the packages you wish to install. When you're finished, restart the wiki (otherwise it won't recognize the newly installed pages correctly).
Make sure you at least install the essential system page package for the language_default you might have configured (the default for this setting is en, i.e English). Note however that if you don't install the whole page set, the installed pages may contain broken links to the non-installed.
If you want to use translated categories and templates, after installing their corresponding pages you still need to update your page_category_regex and page_template_regex configs to match the translated page names. See HelpOnConfiguration and http://moinmo.in/ConfigMarket for more details.
FrontPage configuration
For the root URL of your wiki, moin will use a special page (called the "front page"). Users can be given a translated front page in their preferred language, or they can be given any other single page you specify.
Note: you must set page_front_page to get rid of this page being the front page:
If you go the single language way, you can copy some of the content of FrontPage (or one of its translations) to the page you choose as your page_front_page.
If you go the multiple language way, don't forget to edit all translations of FrontPage.
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.
User interface text translations
MoinMoin tries to adapt the user interface to the language the user prefers.
If 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.
If 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.
If 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.
The 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.
System and help page translations and the navigation bar
The MoinMoin distribution archive contains the system pages (like RecentChanges) in different languages, selecting the correct language in the same way as for the user interface.
For example, if the navi_bar contains a link to RecentChanges, moin will first look for a translation of RecentChanges into the user's language. So if the user's language is German (de), the translation is AktuelleĆnderungen. Moin will use AktuelleĆnderungen in the navi_bar display if that page actually exists; otherwise, it will fall back to using RecentChanges.
Understanding Language packs
Quickstart (for lazy people): Install the package all_pages for the language(s) in which you provide some content.
For each language, there is up 17 packages of underlay pages. The underlay pages are split by priorities (essential, optional and "all") and by categories:
*_System_* - Page needed run the wiki like RecentChanges, FindPage and FrontPage.
*_Help_* - Some help pages (mostly for wiki editors)
*_Template_* - Templates !
*_Category_* - MoinMoin built-in categories (like CategoryCategory)
*_Admin_* - Pages useful for wiki administrators only
*_pages - Contains the content of all 5 packages above.
Language packs are named like essential_help_pages.zip, where essential and help are the priority and category. Here's a matrix with the packages available:
Categories |
||||||
System |
Help |
Template |
Category |
Admin |
All Categories |
|
Essential |
essential_system_pages |
essential_help_pages |
essential_template_pages |
essential_category_pages |
|
essential_pages |
Optional |
optional_system_pages |
optional_help_pages |
optional_template_pages |
|
|
optional_pages |
All priorities |
all_system_pages |
all_help_pages |
all_template_pages |
all_category_pages |
admin_pages |
all_pages |