[publican-list] Fwd: Publican create_site and default langs
Ruediger Landmann
r.landmann at redhat.com
Fri Aug 6 20:49:09 UTC 2010
On 08/06/2010 07:00 PM, Gaël Chamoulaud wrote:
> Hi there,
>
> I want to create a site with publican, which rocks !
>
> FYI, This site has to be in french with all the french documentation we did
> in french too.
>
> So, when I am creating the site, I'm getting this message "No langs Found,
> using default langs"
> And, there is no --lang(s) parameters for publican create_site :/
>
> $ publican create_site --site_config homepage.cfg --db_file ntw.db
> --toc_path ntw_html
> No langs found, using default langs
> No langs found, using default langs
> No langs found, using default langs
>
> What I have to do to create my documentation site in french ?
Hi Gaël and thanks for your kind words
Unfortunately, internationalization and localization for the website
component are not fully implemented yet. The following notes describe
the situation as it currently exists:
--------------------------------
1. create_site
--------------------------------
All Publican websites are multi-lingual; the site attempts to present
content based on the locale reported by the visitor's web browser.
Therefore, there is nothing special that you must do to build the site
framework in French during the "create_site" stage. Please ignore the
"No langs found" warning; it does not affect your site creation.
However, at the moment, if the site JavaScript cannot match the user's
locale with content on the site, it redirects them to American English.
You can manually fix this -- edit the index.html file (for example,
ntw_html/html.index) and look for the lines that say:
var locales = ["en-US"];
and
if(match == 0) {
lang = 'en-US';
}
In both cases, change "en-US" to "fr-FR". Note that if you ever run
publican update_site to refresh the site, you will need to make these
changes again because this file is overwritten each time.
I've opened an RFE to avoid having to do this manually in future
versions of Publican [0]
--------------------------------
2. Creating the homepage
--------------------------------
When you create the site homepage (as described in section 6.2 of the
Publican Users' Guide), you should:
1. set the --lang parameter to French when you create this "book", for
example:
publican create --type Article --name Bienvenue --lang fr-FR
2. edit the publican.cfg file for this "book" to include the line:
def_lang: fr-FR
--------------------------------
Untranslated content
--------------------------------
Some features of the website will still appear in English, because
nobody has translated them into French yet in Publican :)
For example, the contents of the "Statistics" and "Site Tech" pages are
generated in English, and all the navigation elements such as "collapse
all", "Search", "Untranslated"
If you would like to add French support for these elements in Publican
and are already a member of the Fedora localization project, you can
translate them through Fedora's Transifex interface.[1][2] If you would
like to help us but are not a member of the Fedora localization project,
please contact me off-list.
Cheers
Rudi
[0] https://bugzilla.redhat.com/show_bug.cgi?id=622030
[1] https://translate.fedoraproject.org/projects/p/publican/c/trunk/
[2] https://translate.fedoraproject.org/projects/p/publican/c/site_tech/
More information about the publican-list
mailing list