[CentOS-docs] How to put always visible links on a multi-language wiki

Thu Oct 11 13:32:21 UTC 2007
Alain Reguera Delgado <alain.reguera at gmail.com>

In a multi-language way, if we put the main pages on the navigation
bar (navibar) which one we'll chose to put on?, Ex. If we want the
Documentation page be always visible to users, no matter where they
are on the wiki, we can put it on the navibar (as Ralph already
mentioned) to make it always accessible. So, in our new structure
(move English pages to en/, Spanish to es/, and so on) the
documentation pages would be en/Documentation, es/Documentation, etc.
we have to chose one to put it on navibar, then which one we'll chose
? English page, Spanish page, French one ?

In any case, we'll chose the wrong one, at least for users with a
different language to that we have chosen from. doesn't it ?

But no worry, MoinMoin has a workaround. See
http://wiki.centos.org/HelpOnLanguages. What do you think about it ?

A quick glance:

- Install the language pack we want to support (go
http://wiki.centos.org/SystemPagesSetup)
- We need to continue with FrontPage, and not with en/, es/, fr/ pages.
- MoinMoin has built-in dictionaries that translate main pages as
FrontPage, RecentChanges, FindPages, etc, automatically to the
language you select to support (see
http://wiki.centos.org/SystemPagesSetup).
- If we decide to support Spanish, a PáginaInical page is created
(after install Spanish support in the page SystemPagesSetup).
- Fill PáginaInicial page with the Spanish translation content of FrontPage
- When a browser or user wiki language preference is Spanish the user
will see PáginaInicial automatically.
- If the user/browser preference is not Spanish, neither English
(those we have configured now for this explanation), then the user
will see the default language page configured in wikiconfig.py!
- The English user/browser still continue with FrontPage page.

This way,

- PáginaInicial is the front page for Spanish users that have Spanish
language as preference in the browser or wiki account.

- en/Documentation will turn into just Documentation

- es/Documentation will turn into just Documentación (The related
translation to the English Documentation page name).

- We can add the pages Documentation, Download, Promote, Contribute,
About as the following in wikiconfig.py file:

    navi_bar = [
        # If you want to show your page_front_page here:
        #u'%(page_front_page)s',
        u'RecentChanges',
        u'FindPage',
        u'SiteNavigation',
        u'HelpContents',
        u'Documentation',
        u'Download',
        u'Contribute',
        u'Promote',
	u'About',
    ]

- To get these pages (Documentation, Download, Promote, Contribute,
About) translated in the navibar we need to create a dictionary for
the related language. Ex: If we want these pages get translated into
Spanish for those user-wiki-accounts/browsers with Spanish preference
as default, we can create the page SpanishDict and put inside it the
following:

 Documentation:: Documentación
 Download:: Descargar
 Promote:: Promocionar
 Contribute:: Contribuir
 About:: Info

Note the space before the lines, it is necessary.

The translated pages need to be created first, otherwise the default
page is shown. Ex. If the Descargar page is not created we'll see the
Download link in the navibar instead. When the Descargar page should
be created, we'll  see the translation link in the navibar to the
Descargar page.

- So,

  - English users will have: a FrontPage page with a Documentation
link in the navibar to the Documentation page.

  - Spanish users will have: a PáginaInicial page with a Documentación
link in the navibar to the Documentación page.

  - Users without language support on this wiki will have: a FrontPage
with a Documentation link  in the navibar to the Documentation page.
Because the default language_default in wikiconfig.py is
English('en').

Would be convenient to CentOS to show a translated page as front page
to non-english users and implement all this structure on the wiki ?

Cheers,

al