Multilingual SPIP [] template v0.5

All contributions published for previous SPIP versions

Some simple and easy-to-custom templates to set up a multilingual website under SPIP.

Some templates under GPL license in order to set up a multilingual website with SPIP. They are simple and easy to custom.

-  Name of the template : Squelette SPIP [] multilingue
-  Version of the template : 0.5
-  Licence : GPL
-  Compatibility SPIP : SPIP > 1.7


-  Specifications
-  Installation
-  Compatibility
-  Archive's tree
-  Includes
-  Templates
-  mes_fonctions.php3
-  Customization


-  XHTML code
-  CSS 2 style sheets(@media screen & print)
-  one language by sector
-  homepage in the favorite language of the browser (contribution of Laurent Laville)
-  XML/RSS backend files automaticaly detected
-  a forum for every language (contribution of BoOz)
-  searching in one language at a time
-  simulated translation links for sections
-  language files (English and French)
-  google style for sorting results of a search (contribution Nicolas Steinmetz and pdepaepe)
-  smileys version II (contribution of BoOz)
-  plural matching

Note : news and web sites directories are not used.


1. Uncompress archive, you get a folder squelette multilingue v0.5 which contains the folder maiis/ and the file mes_fonctions.php3.

2. Copy the folder maiis/ to SPIP’s root and copy the content of the file mes_fonctions.php3 in mes_fonctions.php3 if you don’t want to overwrite your home maid functions. $GLOBALS[ 'dossier_squelettes' ] = "maiis" ; in mes_fonctions.php3 tells SPIP where to look for the templates, so that you can give a try with those templates without overwriting yours. You can go back to the initial setup if you delete that line.

3. Set up your site to enable translation links. Here’s my setup :

Enable the language menu for the articles ? No
Enable the language menu for the sections ? Yes
... only for the sections located at the root ? Yes
Managing translation links ? Yes

4. One language per sector. In the private area, create sections and affect them language, logo and hovering logo (flags). To simulate a translation link for sections : create the keyword group structure_rubriques, when user browses a section, he can be redirected to the “translated” section in another sector. Now create as many keywords as shared sections. To set a forum, associate the keyword “forum” only to one article in each sector.

ex: for homepage, sectors are linked with the keyword “accueil”.


Tested ?OSBrowserVersion
yes Windows Internet Explorer 5.5, 6
yes Windows Mozilla 1.6
yes MacosX Safari 1.2.3
yes MacosX Mozilla 1.6
yes MacosX Internet Explorer 5.2
no MacosX Opera
no Windows Opera
no Linux Mozilla
no Linux Konqueror

Let me know if the templates display as they should on non-tested OS/browsers.


             smileys/   // contains smileys
             logo.gif   // site's logo
             icon.gif   // favicon
             en_off.png   // English flag off 
             en_on.png   // English flag on
             fr_off.png   // French flag off
             fr_on.png   // French flag on
      inclusions/   // contains includes
      lang/   // contains language files
             local_en.php3   // English
             local_fr.php3   // French
      styles/   // contains style sheets
             impression.css   // to print
             style.css   // to display on screen
mes_fonctions.php3 // contains filters


All included files are in maiis/inclusions

inc_head.html manages META tags, style sheet, backend and favicon paths
inc_entete.html displays the site’s name and hierarchy (sector is omitted)
inc_menu.html displays horizontal menu
inc_traductions.html manages :
-  redirection to an article’s transaltion
-  redirection to a shared section in another language (you have to first set up keywords)
inc_rubriques.html displays sectors’ tree and the number of articles in each section
inc_recherche.html displays searching form in the language in use
inc_derniers_commentaires.html displays the last 7 comments in the sector in use
inc_decompte.html displays how many comments has an article
inc_meme_rubrique.html displays the article in the same section
inc_smileys.html displays smileys contained in the maiis/images/smileys folder
inc_pied_de_page.html displays copyright and XML picture which is linked to the language’s backend


sommaire.html redirects user to the homepage in the browser’s favourite language
rubrique.html displays homepage when id_rubrique is a sector otherwise it displays the section’s content
article.html displays an article, or the forum when the article is linked to the keyword forum
auteur.html displays the autor’s biography and articles he wrote
forum.html enables user to post a message
login.html is the login page
plan.html lists sections and articles
recherche.html displays seach results
resume.html lists all articles (10 per page)


$GLOBALS[ ’dossier_squelettes’ ] tells SPIP where to look for the templates
$GLOBALS[ ’puce’ ] customs SPIP’s list style
smileys() a contribution of BoOz, adds smileys to a text [(#TEXTE/smileys)]
gerer_menu_langues() to redirect user to the right homepage
google_like() google like search results


-  site’s logo : in maiis/styles/styles.css you can change the path to logo.gif.

#entete {
        background: #fff url(../images/logo.gif) no-repeat;
        /*                       HERE                    */
        border: 0;
        margin: 0;
        height: 65px;
        padding: 0 0 0 10px;
        text-align: left;
        line-height: 65px;
        font-size: 16px;
        font-weight: bold;
        text-decoration: none;
        letter-spacing: 1px;
        color: #000;

-  favicon in maiis/inclusions/inc_head.html you can change the path to icon.gif.

<!-- Icone du site pour les favoris -->
<link rel="shortcut icon" type="image/gif" href="maiis/images/icon.gif" />

-  presentation, margins, colors... that’s in the style sheet maiis/styles/styles.css. Here is an overview of all pages :

  |                                                   |
  |                                                   |
  |     +---#page-------------------------------+     |
  |     | +---#entete-------------------------+ |     |
  |     | |                                   | |     |
  |     | |                                   | |     |
  |     | +-----------------------------------+ |     |
  |     | +---#menu---------------------------+ |     |
  |     | |                                   | |     |
  |     | +-----------------------------------+ |     |
  |     | +---#contenu_principal--++-#barre_--+ |     |
  |     | |                       || laterale | |     |
  |     | |                       ||          | |     |
  |     | |                       ||          | |     |
  |     | |                       ||          | |     |
  |     | +-----------------------++----------+ |     |
  |     | +---#pied_de_page-------------------+ |     |
  |     | |                                   | |     |
  |     | +-----------------------------------+ |     |
  |     +---------------------------------------+     |
  |                                                   |
  |                                                   |

there are some french comments in the files.


No discussion

Add a comment

Avant de faire part d’un problème sur un plugin X, merci de lire ce qui suit :

  • Désactiver tous les plugins que vous ne voulez pas tester afin de vous assurer que le bug vient bien du plugin X. Cela vous évitera d’écrire sur le forum d’une contribution qui n’est finalement pas en cause.
  • Cherchez et notez les numéros de version de tout ce qui est en place au moment du test :
    • version de SPIP, en bas de la partie privée
    • version du plugin testé et des éventuels plugins nécessités
    • version de PHP (exec=info en partie privée)
    • version de MySQL / SQLite / PostgreSQL
  • Si votre problème concerne la partie publique de votre site, donnez une URL où le bug est visible, pour que les gens puissent voir par eux-mêmes.
  • En cas de page blanche, merci d’activer l’affichage des erreurs, et d’indiquer ensuite l’erreur qui apparait.

Merci d’avance pour les personnes qui vous aideront !

Par ailleurs, n’oubliez pas que les contributeurs et contributrices ont une vie en dehors de SPIP.

Who are you?
[Log in]

To show your avatar with your message, register it first on (free et painless) and don’t forget to indicate your Email addresse here.

Enter your comment here

This form accepts SPIP shortcuts {{bold}} {italic} -*list [text->url] <quote> <code> and HTML code <q> <del> <ins>. To create paragraphs, just leave empty lines.

Add a document

Follow the comments: RSS 2.0 | Atom