mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Update the translation documentation.
This commit is contained in:
parent
2f915caff2
commit
6e4a826dc1
1 changed files with 34 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue