What will I learn to do?
Since version 1.7, SPIP has become a real multilingual publishing tool.
As a webmaster of an on-line magazine, you too will sooner or later have to work with multiple languages.
In this lesson you will learn the different techniques offered by SPIP to work with multiple languages:
creating one set of templates per language, to manage the presentation of your site idependentely for each language
using Multi-tags, to mix different languages in a given template

relying on Language files, to make the most of all the already translated sentences in SPIP
How do I implement multiple languages by using one template per language?
The simplest solution to create a multi-language site is to create one template per language for each type of templates.
If you don’t know the iso code of your language, just check it inside the private area in the multilingual tab of the language management page.
All you have to do is append the two letters representing the language before the extension ’.html’ of the template name.

Suppose that in the folder ’squelettes/’ the following templates exist:
’article.html’
’article.fa.html’ (Farsi)
’article.ps.html’ (Pashto)
If you want to view an article:
in English, ’article.html’ will be used as this is the default template
in Farsi, ’article.fa.html’ will be used
in Pashto, ’article.ps.html’ will be used
To implement this, follow the steps below:
from the ’dist/’ folder, copy the template ’article.html’ into the folder ’squelettes/’
create two copies of the ’article.html’ template: ’article.fa.html’ and ’article.ps.html’
open the three templates in a text editors
in ’article.html’ write the words ’Thank you’ at the end
in ’article.fa.html’ write ’متشکرم’
in ’article.ps.html’ write ’شکر’
To see the result, visit articles in each of the three languages in the public site.
Implement multiple languages by using one template per language
In practice this solution is the most difficult one to maintain: indeed, whether it is through lack of time or forgetfulness, the webmaster may make modifications to the main language and not to the other languages.
A more maintainable solution is to have only one template which uses multi-tags.
How can I use tags?
Multi-tags can be used directly in the templates in order to produce a different content based on the language in which the template is called.
For instance this multi-tag:
will display ’Thank you’ if the language used is English but it will display ’متشکرم’ if the language used is Farsi and ’شکر’ if the language used is Pashto.
To implement this:
delete ’article.fa.html’ and ’article.ps.html’, files which you previously created in the ’squelettes/’ folder
open ’article.html’ in your text editor
at the end of ’article.html’, replace ’Thank you’ by the following multi-tag:
’<multi>[en] Thank you [fa] متشکرم [ps] شکر</multi>’
To see the result, visit articles in each of the three languages in the public site.
Implement multiple languages by using multi-tags
The advantage of this method is that it is simple to implement and is more maintainable than the first one.
There are nevertheless long-term disadvantages.
Suppose for instance that you are using multi-tags in numerous locations in all your templates, and that after a few years you have to add German to your editorial content: you will then have to modify your multi tags in all your templates to add the German sentences.
For instance your ’Thank you’ multi tag will become:
And if you have plans to implement say, Spanish, then the situation will become unmanageable.
The most maintainable solution consists in using language files.