From 6e4a826dc1b64bde468f987a387d3baa28c6dd66 Mon Sep 17 00:00:00 2001 From: Alexis Metaireau Date: Thu, 6 Jan 2011 02:33:14 +0100 Subject: [PATCH] Update the translation documentation. --- docs/getting_started.rst | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/docs/getting_started.rst b/docs/getting_started.rst index f66a6f06..0b928afe 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -91,7 +91,39 @@ the menu. Translations ============ -It is possible to translate articles. To do so, you need to add a `Lang` meta +It is possible to translate articles. To do so, you need to add a `lang` meta in your articles/pages, and to set a `DEFAULT_LANG` setting (which is en by -default). Then, only articles with this default language will be listed, and +default). +Then, only articles with this default language will be listed, and each article will have a translation list. + +Pelican uses the "slug" of two articles to compare if they are translations of +each others. So it's possible to define (in restructured text) the slug +directly. + +Here is an exemple of two articles (one in english and the other one in +french). + +The english one:: + + Foobar is not dead + ################## + + :slug: foobar-is-not-dead + :lang: en + + That's true, foobar is still alive ! + +And the french one:: + + Foobar n'est pas mort ! + ####################### + + :slug: foobar-is-not-dead + :lang: fr + + Oui oui, foobar est toujours vivant ! + +Despite the text quality, you can see that only the slug is the same here. +You're not forced to define the slug that way, and it's completely possible to +have two translations with the same title (which defines the slug)