The default language

NGO-bg Team

NGO-bg templates are made especially for multi-lingual sites. For this reason, it is recommended that you always create "language" sections in the root of your site. For example:


10. НПО България (Bulgarian site)
20. NGO Bulgaria (English site)
30. ONG Bulgarie (French site)

If your site only publishes in one language, you must still create a root section for it:


10. Your Site

This is a particulity of NGO-bg templates, not of SPIP. SPIP allows us to international websites with different techniques, but this the one we tought was the most appropriate for our project.

The default language of the website

Simply said, it is the section with the lowest number. In the above example, it is 10. НПО България (Bulgarian).

Auto-detecting the language of the visitor

NGO-bg is using a special trick based on an article by Laurent Laville (in French) to detect the language of the browser used by the visitor.

The language will be checked with the languages of the sections at the root of the site, but only if their "number" is between 00 and 79.

For example, Social Rights Bulgaria has articles in Bulgaria, English, French and Italian. Therefore, the root sections are:


10. Social Rights Bulgaria
20. Социални права България
85. « Droits sociaux » Bulgarie
99. Social Rights Bulgaria - .it
PNG - 2.8 kb
Language menu from Social Rights Bulgaria
From the English version of the site, Bulgarian and French are shown as alternative "home pages" for the site. Italian is not shown since it has a "99." in its title.

In the above example, English is the default language. Bulgarian is selected if the user has selected Bulgarian in the language settings of his/her browser. French is not auto-detected, since there is little content, but it is still shown on the website as an available language (most of the information about our team and aims has been translated). Italian is neither auto-detected, nor shown as an available language, since the site has only 2 Italian articles who are translations from articles republished by a friendly Italian organisation.

To send a message Private area Registering with the site xml ?