Browsed by
Tag: Languages / Linguistics

Un Parti des Pirates Suisse multilingue? [fr]

Un Parti des Pirates Suisse multilingue? [fr]

[en] Will the community gathered around the creation of a Swiss Pirate Party manage to include the various linguistic groups of the country, or will the Roestigraben win, like it did in the 2006 Swiss Blog Awards? Interesting situation which I'm following closely.

Le projet pour aujourd’hui était de mettre en ligne mes photos de ce week-end et de vous parler un peu de mon premier Bol d’Or (historique: 64 à l’arrivée sur 550, tous les autres ont dû abandonner, faute de vent). La bonne nouvelle c’est que j’ai commencé à trier mes photos, et qu’il y en a des sympas. Et l’autre bonne nouvelle c’est que je suis allée faire un saut sur le canal IRC (#piraten-schweiz) des pirates suisses, et que j’y ai recommencé à parler de questions linguistiques.

piratench-90x90Car, oui, la question se pose: l’initiative est majoritairement suisse-allemande. Est-ce que le Roestigraben va gagner, comme lors des Swiss Blog Awards de 2006, ou bien parviendra-t-on à créer un groupe d’intérêt (et peut-être même un parti politique) multilingue? L’intention est là, en tous cas. Si vous êtes francophone et intéressé, n’hésitez pas à vous manifester — ils sont assez accueillants, ces satanés pirates.

Je me suis fendue d’un petit article sur la question des langues dans leur forum (il faut passer par l’interface allemande pour s’y inscrire, mais une fois là, on peut changer la langue et être un peu moins dépaysé) que j’ai aussi relayé dans le forum-ghetto francophone. (Mais oui, vous saviez déjà que j’avais un faible pour les questions linguistiques, non?)

J’y prône entre autres les bienfaits du mélange de langues sur un même forum ou dans un même blog plutôt que la ségrégation qui appauvrit inévitablement les langues minoritaires, puisque les bilingues filent tout naturellement là où il y a le plus d’animation, dans leur langue majoritaire.

La volonté de tout traduire est un piège: il faut accepter que le contenu sera imparfaitement dupliqué si l’on crée des instances d’un même document en plusieurs langues. Sinon, toute la publication est paralysée. Pour animer un blog, aussi, la traduction n’est pas la meilleure solution: primo parce que nous les Romands, on en a marre qu’on ne nous serve que du contenu suisse-allemand réchauffé à la sauce (mauvaise) traduction, et deuxio parce que produire du contenu original demande souvent moins d’effort que faire une traduction (à peu près) correcte — sauf si on a à disposition une armée de traducteurs professionnels ;-).

A suivre. C’est un dossier qui m’intéresse.

Similar Posts:

Google: "Don't Mix Languages on the Same Page" [en]

Google: "Don't Mix Languages on the Same Page" [en]

[fr] Dommage, un article sur comment démarrer son site multilingue sur un des blogs officiels de Google donne des conseils que je trouve assez malheureux (genre: "ne mélangez pas plusieurs langues sur une même page").

I wanted to leave this as a comment on [How to Start a Multilingual Site](http://googlewebmastercentral.blogspot.com/2008/08/how-to-start-multilingual-site.html) over on the [Official Google Webmaster Central Blog](http://googlewebmastercentral.blogspot.com/), but unfortunately Blogger is taking a break right now and I can’t post. So, here we go:

“Avoid mixing languages on each page, as this may confuse Googlebot as well as your users.” (Nico, thanks, I’d missed that one)

I’m really disappointed to see this kind of advice handed out. Yes, it confuses Googlebot, but only because it doesn’t (I guess?) take into account lang=”xx” attributes. (Yeah, nobody uses them, but that’s because nobody parses them.)

But users? Most people are not pure monolinguals. We need ways to make linguistic barriers online weaker, and not stronger.

I’ve been mixing languages on Climb to the Stars for eight years now, and it hasn’t prevented my readers or my Page Rank from being happy.

I vote for Google learning that the “page” is not the smallest item on the web that is allowed to have its own language attribute, rather than asking people to conform to some kind of artificial absolute monolingualism.

I’ll try an post tomorrow, but at least this is out there. I left a [previous comment](http://googlewebmastercentral.blogspot.com/2008/08/how-to-start-multilingual-site.html?showComment=1218212760000#c5946499968667089685) on the same post earlier today, by the way. (Check out my other [multilingual stuff](/multilingual) while you’re on the topic.)

Similar Posts:

Interviewed About Multilingualism by Andrea Vascellari [en]

Interviewed About Multilingualism by Andrea Vascellari [en]

[fr] Une interview qui date de novembre, mais que je ne regarde qu'aujourd'hui (à ma grande honte). Andrea Vascellari m'a attrapée à Berlin lors de Web2.0Expo, et m'a interviewée sur les questions de multilinguisme en ligne que j'affectionne. Il a ajouté au début une petite partie sur Going Solo, donc si vous avez déjà vu mon discours donné à LIFT, sautez sans arrière-pensée les premières trois minutes de la vidéo. La suite est nouvelle, je vous rassure!

At Web2.0Expo in Berlin, last November, I met [Andrea Vascellari](http://media.vascellari.com/?page_id=2). He’s Italian, lives in Finland, and does a regular video podcast on [Vascellari Media Channel — VMC](http://media.vascellari.com/). I was [speaking on multilingualism at Web2Open](http://climbtothestars.org/archives/2007/11/05/reminder-speaking-tuesday-at-web2open-berlin/), so we sat down in a corridor (we thought it would be nice and quiet, but we picked a spot just near… the loo/bathroom/restroom/toilets) for a little chat on the topic of [languages online](/focus/multilingual).

Upon editing, Andrea added a few words about [Going Solo](http://going-solo.net) and inserted my [speech](http://video.google.com/videoplay?docid=-8270350768335569204) about it — so if you already saw [the LIFT08 speech](http://climbtothestars.org/archives/2008/02/07/lift08-my-going-solo-open-stage-speech/), feel free to skip the first 3-4 minutes. There’s a whole bunch of new material waiting for you after it.

[VMC #30, where Andrea introduces Going Solo and makes me talk about multilingualism online](http://media.vascellari.com/?p=46). Andrea clearly knows the art of making his guest look good — thanks a lot!

Similar Posts:

Vidéo de ma conférence sur le multilinguisme à Paris Web 2007 [fr]

Vidéo de ma conférence sur le multilinguisme à Paris Web 2007 [fr]

[en] For once, I was asked to give one of my multilingual talks in French. Here is the video recording of it.

Il y a un décalage qui me perplexe parfois un peu entre les conférences que je donne en français et celles que je donne en anglais. En français, on me demande immanquablement de parler [d’ados et internet](http://stephanie-booth.com/fr/ecoles/) ou éventuellement des blogs en général ou [en entreprise](http://stephanie-booth.com/fr/entreprises/blogs/). Dans le monde anglophone, c’est une tout autre histoire, et ce sont des sujets beaucoup plus pointus, comme [le multilinguisme sur internet](/focus/multilingual), par exemple.

Je suis contente qu’on m’ait enfin demandé de traiter de ce sujet en français, lors de la conférence [Paris Web 2007](http://2007.paris-web.fr/). Voici l’enregistrement vidéo de ma conférence,intitulée “En attendant le Poisson de Babel”.

Sur le site de Paris Web, vous trouverez des liens vers [l’enregistrement audio et autres ressources](http://2007.paris-web.fr/Presentations-des-intervenants#nov_16-multi-linguisme) ainsi que [d’autres formats vidéo](http://videos.paris-web.fr/). Voici la présentation que j’ai utilisée:

Voici une liste (pas forcément complète) de ce que [d’autres ont écrit au sujet des diverses incarnations de cette conférence](http://del.icio.us/steph/babelfishtalk) — en français et en anglais.

Similar Posts:

Two Plugin Updates: Basic Bilingual 0.32 and Language Linker 0.2 [en]

Two Plugin Updates: Basic Bilingual 0.32 and Language Linker 0.2 [en]

[fr] Je me suis levée à l'aube pour aller faire la nouille sur RSR1 et prendre un p'tit déj improvisé chez une ancienne copine d'uni. Ensuite, j'ai passé la journée les mains dans le PHP, ce qui veut dire que je n'ai beaucoup blogué, mais que j'ai mis à jour deux plugins: Basic Bilingual, qui permet de tenir sans peine un blog "bilingue" comme celui-ci (c'est ce qui me permet de rédiger et d'afficher ce petit extrait en français) et Bunny's Language Linker, très utile pour afficher des liens entre pages correspondantes des différentes traductions d'un site.

After waking up at an ungodly hour this New Year’s Day (for a [live radio appearance](http://info.rsr.ch/fr/rsr.html?programId=110451&bcItemName=le_grand_8&rubricId=8888&contentDisplay=last_five&siteSect=1000#mardi) and impromptu breakfast at a uni friend’s home nearby) I spent the rest of my day elbows deep in PHP code. As a result, I haven’t written the half-dozen of posts that have been sitting in my drafts list over Christmas, but I have updated two plugins — an old one, and a new-born.

**[Basic Bilingual](http://wordpress.org/extend/plugins/basic-bilingual/) 0.32**

[Download](/code/basic-bilingual.tgz) | [zip](/code/basic-bilingual.zip) | [.phps](/code/basic-bilingual.phps)

This release fixes the [disappearing excerpts problem](http://climbtothestars.org/archives/2007/12/18/nasty-problem-with-basic-bilingual-plugin/) (was fixed in 0.31 actually, but I never announced it) and replaces the ugly “language box” floating somewhere near the top of the post admin page by a pretty DBX (let me know what it stands for) box in the sidebar:

Basic Bilingual got a dbx box for the new year!

**[Bunny’s Language Linker](http://wordpress.org/extend/plugins/bunnys-language-linker/) 0.2**

[Download](/code/language-linker.tgz) | [zip](/code/language-linker.zip) | [.phps](/code/language-linker.phps)

(I always want to call it “Language Links”, which was the initial name I chose — still not sure I was right to change.) Anyway, this version is pretty exciting, as it does something I’ve been thinking of for a while: it puts the link to the other localized versions of the page you’re viewing in the menu bar if you’re using a Sandbox-based theme:

Language Linker link in the menu bar!

Otherwise, it puts it at the end of the page in its own div (you can style it the way you wish). I’m not saying this is the best, final solution, but I think it’s headed in the right direction.

Similar Posts:

Bunny's Language Linker: New WordPress Plugin [en]

Bunny's Language Linker: New WordPress Plugin [en]

[fr] Un nouveau plugin WordPress que je viens d'écrire. Celui-ci vous permet de gérer les liens entre pages équivalentes de deux versions linguistiques d'un site. Par exemple, si vous avez http://stephanie-booth.com/en et http://stephanie-booth.com/fr (deux installations WordPress séparées!), le plugin vous aidera à faire en sorte qu'il y ait des liens entre http://stephanie-booth.com/en/about et http://stephanie-booth.com/fr/a-propos.

Ladies and Gentlemen, I’m proud to announce the WordPress plugin [Bunny’s Language Linker](/code/language-linker.tgz) ([zip](/code/language-linker.zip), [phps](/code/language-linker.phps)).

I’ve been wanting to write this plugin for ages, and I’ve finally done it this evening. This is a plugin for people who have a WordPress site with content duplicated in more than one language, like I’m going to have with [stephanie-booth.com](http://stephanie-booth.com). For example, you have an “about” page in English, and another “about” page in German. This plugin helps you create and manage links between such “sister” pages. (“Pages”, not “posts”. It doesn’t work with posts at all.)

The plugin adds an extra field to the page editing form, inviting you to input the *page slug* of the sister page:

Bunny's Language Linker - Admin view

The screenshot is a bit small, but there on the right, there is a little box with “a-propos” — the slug of the French sister page. It works with more than one other language, too. You just need to edit the settings in the plugin file to specify which languages you’re playing with (instructions are in the plugin file). If I had sites in 3 other languages, say French, Spanish, and German, my settings line in the plugin file would look like this:

$bll_other_languages=array(‘fr’, ‘es’, ‘de’);

And the little box would provide three different fields for the page slugs of the different localized sites. (OK, I’m making this sound complicated, sorry.)

The plugin then automatically adds links to the sister pages you’ve indicated. Here’s what it could look like:

Bunny's Language Linker - Page view

There’s a readme file with the plugin which will give you some more details. I’ll soon have a client site in production using that plugin, so if these explanations weren’t very clear, hopefully the demonstration will help.

Similar Posts:

Browser Language Detection and Redirection [en]

Browser Language Detection and Redirection [en]

[fr] Une explication de la méthode que j'ai suivie pour que http://stephanie-booth.com redirige le visiteur soit vers la version anglaise du site, soit la française, en fonction des préférences linguistiques définies dans son navigateur.

**Update, 29.12.2007: scroll to the bottom of this post for a more straightforward solution, using Multiviews.**

I’ve been working on [stephanie-booth.com](http://stephanie-booth.com) today. One of my objectives is the add an [English version](http://stephanie-booth.com/en/) to the previously [French-only site](http://stephanie-booth.com/fr/).

I’m doing this by using two separate installations of WordPress. The content in both languages should be roughly equivalent, and I’ll write a WordPress plugin which allows to “automate” the process of linking back and forth from equivalent content in different languages.

What I did today is solve a problem I’ve been wanting to attack for some time now: use people’s browser settings to direct them to the “correct” language for the site. Here is what I learnt in the process, and how I did it. It’s certainly not the most elegant way to do things, so let me know if you have a better solution by using the comments below.

First, what I needed to know was that the browser language preferences are sent in the HTTP_ACCEPT_LANGUAGE header (HTTP header). First, I thought of [capturing the information through PHP](http://www.webdeveloper.com/forum/showpost.php?s=d989341270ceae8820a3bc1c6273dc9e&p=217863&postcount=2), but I discovered that Apache (logical, if you think of it) could handle it directly.

[This tutorial was useful in getting me started](http://www.ibm.com/developerworks/library/wa-apac.html), though I think it references an older version of Apache. Out of the horses mouth, [Apache content negotiation](http://httpd.apache.org/docs/2.0/content-negotiation.html) had the final information I needed.

I’ll first explain the brief attempt I did with Multiviews (because it can come in handy) before going through the setup I currently have.

### Multiviews

In this example, you request a file, e.g. test.html which doesn’t physically exist, and Apache uses either test.html.en or test.html.fr depending on your language preferences. You’ll still see test.html in your browser bar, though.

To do this, add the line:

Options +Multiviews

to your .htaccess file. Create the files test.html.en and test.html.fr with sample text (“English” and “French” will do if you’re just trying it out).

Then, request the file test.html in your browser. You should see the test content of the file corresponding to your language settings appear. Change your browser language prefs and reload to see what happens.

This is pretty neat, but it forces you to open a file — and I wanted / to redirect either to /en/ or to /fr/.

It’s explained pretty well in [this tutorial I already linked to](http://www.ibm.com/developerworks/library/wa-apac.html), and [this page has some useful information](http://unix.org.ua/orelly/linux/apache/ch06_03.htm) too.

### Type maps

I used a type map and some PHP redirection magic to achieve my aim. A type map is not limited to languages, but this is what we’re going to use it for here. It’s a text file which you can name menu.var for example. In that case, you need to add the following line to your .htaccess so that the file is dealth with as a type map:

AddHandler type-map .var

Here is the content of my type-map, which I named menu.var:

URI: en.php
Content-Type: text/html
Content-Language: en, en-us, en-gb

URI: fr.php
Content-Type: text/html
Content-Language: fr, fr-ch, fr-qc

Based on my tests, I concluded that the value for URI in the type map cannot be a directory, so I used a little workaround. This means that if you load menu.var in the browser, Apache will serve either en.php or fr.php depending on the content-language the browser accepts, and these two PHP files redirect to the correct URL of the localized sites. Here is what en.php looks like:

And fr.php, logically:

Just in case somebody came by with a browser providing neither English nor French in the HTTP_ACCEPT_LANGUAGE header, I added this line to my .htaccess to catch [any 406 errors (“not acceptable”)](http://www.checkupdown.com/status/E406.html):

ErrorDocument 406 /en.php

So, if something goes wrong, we’re redirected to the English version of the site.

The last thing that needs to be done is to have menu.var (the type map) load automatically when we go to stephanie-booth.com. I first tried by adding a DirectoryIndex directive to .htaccess, but that messed up the use of index.php as the normal index file. Here’s the line for safe-keeping, if you ever need it in other circumstances, or if you want to try:

DirectoryIndex menu.var

Anyway, I used another PHP workaround. I created an index.php file with the following content:

And there we are!

### Accepted language priority and regional flavours

In my browser settings, I’ve used en-GB and fr-CH to indicate that I prefer British English and Swiss French. Unfortunately, the header matching is strict. So if the order of your languages is “en-GB, fr-CH, fr, en” you will be shown the French page (en-GB and fr-CH are ignored, and fr comes before en). It’s all explained in the Apache documentation:

> The server will also attempt to match language-subsets when no other match can be found. For example, if a client requests documents with the language en-GB for British English, the server is not normally allowed by the HTTP/1.1 standard to match that against a document that is marked as simply en. (Note that it is almost surely a configuration error to include en-GB and not en in the Accept-Language header, since it is very unlikely that a reader understands British English, but doesn’t understand English in general. Unfortunately, many current clients have default configurations that resemble this.) However, if no other language match is possible and the server is about to return a “No Acceptable Variants” error or fallback to the LanguagePriority, the server will ignore the subset specification and match en-GB against en documents. Implicitly, Apache will add the parent language to the client’s acceptable language list with a very low quality value. But note that if the client requests “en-GB; q=0.9, fr; q=0.8”, and the server has documents designated “en” and “fr”, then the “fr” document will be returned. This is necessary to maintain compliance with the HTTP/1.1 specification and to work effectively with properly configured clients.

Apache, Content Negotiation

This means that I added regional language codes to the type map (“fr, fr-ch, fr-qc”) and also that I changed the order of my language preferences in Firefox, making sure that all variations of one language were grouped together, in the order in which I prefer them:

Language Prefs in Firefox

### Catching old (now invalid) URLs

There are lots of incoming links to pages of the French site, where it used to live — at the web root. For example, the contact page address used to be http://stephanie-booth.com/contact, but it is now http://stephanie-booth.com/fr/contact. I could write a whole list of permanent redirects in my .htaccess file, but this is simpler. I just copied and modified the rewrite rules that WordPress provides, to make sure that the correct blog installation does something useful with those old URLs (**bold** is my modification):

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . **/fr**/index.php [L]

# END WordPress

In this way, as you can check, [http://stephanie-booth.com/contact](http://stephanie-booth.com/contact) is not broken.

### Next steps

My next mission is to write a small plugin which I will install on both WordPress sites (I’ve got to write it for a client too, so double benefit). This plugin will do the following:

– add a field to the write/edit post field in which to type the post slug of the correponding page/post in the other language *(e.g. “particuliers” in French will be “individuals” in English)
– add a link to each post pointing to the equivalent page in the other language

It’s pretty basic, but it beats manual links, and remains very simple. (I like simple.)

As I said, if you have a better (simpler!) way of doing all this, please send it my way.

### A simpler solution **[Added 29.12.2007]**

For each language, create a file named index.php.lg where “lg” is the language code. For French, you would create index.php.fr with the following content:

Repeat for each language available.

**Do not** put an index.php file in your root directory, just the index.php.lg files.

Add the two following lines to your .htaccess:

Options +Multiviews
ErrorDocument 406 /fr/

…assuming French is the default language you want your site to show up in if your visitor’s browser doesn’t accept any of the languages you provide your site in.

You’re done!

Similar Posts:

BlogTalk 2008 Proposal — Being Multilingual: Blogging in More Than One Language [en]

BlogTalk 2008 Proposal — Being Multilingual: Blogging in More Than One Language [en]

Here’s the proposal I just sent for [BlogTalk 2008](http://2008.blogtalk.net/) (Cork, Ireland, March 3-4):

> The strongest borders online are linguistic. In that respect, people who are comfortable in two languages have a key “bridge” role to play. Blogging is one of the mediums through which this can be done.

> Most attempts at bilingual (or multilingual) blogging fall in three patterns:

> – separate and independent blogs, one per language
> – one blog with proper translation of all content, post by post
> – one blog with posts sometimes in one language, sometimes in another

> These different strategies and other attempts (like community-driven translation) to use blogging as a means to bridge language barriers are worth examining in closer detail.

> Considering that most people do have knowledge (at least passive, even if incomplete) of more than one language, multilingual blogging could be much more common than it is now. The tools we use, however, assume that blogs and web pages are in a single language. Many plugins, however, offer solutions to adapt existing tools like WordPress to the needs of multilingual bloggers. Could we go even further in building tools which encourage multilingualism rather than hindering it?

> —-
> Extra material:

> I’ve gathered pointers to previous talks and writings on the topic here: [http://climbtothestars.org/focus/multilingual](http://climbtothestars.org/focus/multilingual) — most of them are about multilingualism on the internet in general, but this proposal is for a talk much more focused on blogging. Here is a video of the first talk I gave in this series (by far not the best, I’m afraid!) [http://video.google.com/videoplay?docid=2096847420084039011](http://video.google.com/videoplay?docid=2096847420084039011) and which was about multilingual blogging — it can give you an idea of what this talk could look like, though I’ve refined my thinking since then and have now fallen in the grips of presentation slides. I also intend to base my talk on real-world examples of what bloggers are doing in the field.

> Please don’t hesitate to get in touch if you would like more details for evaluating this proposal.

We had a long discussion on IRC about the fact that the submission process required a 2-page paper for a talk (in all honesty, for me, almost the same amount of sweat and tears as preparing the talk itself — I’ll let you figure that one out yourself). BlogTalk is a conference which aims to bridge the space between academics and practitioners, and a 2-page paper, I understood, was actually a kind of compromise compared to the usual 10-15 page papers academics send in when they want to speak at conferences.

The form was changed, following this discussion, to make the inclusion of the paper optional. Of course, this might reflect badly on proposals like mine or [Stowe’s](http://www.stoweboyd.com/message/2007/11/proposal-for-bl.html) which do not include a paper. We’ll see!

I’ll also be speaking on [structured portable social networks](http://climbtothestars.org/archives/2007/08/16/we-need-structured-portable-social-networks-spsn/) during the workshop on [social network portability](http://webcamp.org/SocialNetworkPortability), the day before the conference.

Similar Posts:

Basic Bilingual 0.3 for Multilingual Blogging [en]

Basic Bilingual 0.3 for Multilingual Blogging [en]

[fr] Une mise à jour de mon plugin "Basic Bilingual" qui permet de rendre WordPress bilingue. Modification majeure: il n'y a plus besoin de bidouiller son template pour faire apparaître l'extrait du billet dans "l'autre langue". Par contre, c'est toujours nécessaire pour rajouter les attributs lang.

Long overdue, an upgrade of my plugin Basic Bilingual. Grab the [tgz archive](/code/basic-bilingual.tgz) or [check out the code](/code/basic-bilingual.phps).

Some explanations. First, you all know of my [long-standing interest in all things multilingual](/focus/multilingual) and in [multilingual blogging](http://climbtothestars.org/archives/2007/03/25/blogcamp-multilingual-blogging-session/) in particular.

Years ago, I switched to [Movable Type](http://climbtothestars.org/archives/2004/01/03/switch-to-movable-type/) and then to [Wordpress](http://climbtothestars.org/archives/2004/06/23/switch-to-wordpress/) because I was blogging in two languages. Movable Type allowed me to assign more than one category to each post — so I used two huge categories, fr and en, to indicate what language I was blogging in. This soon made the rebuilds a real pain in the neck, and WordPress allowed me first of all to [happily hack it into being multilingual](http://climbtothestars.org/archives/2004/07/11/multilingual-weblog/), and then actually [write a plugin to do it in a cleaner way](http://climbtothestars.org/archives/2005/01/23/basic-bilingual-plugin/). The plugin hasn’t changed much since, and this upgrade isn’t a major one, but it’s a step in the right direction.

Ideally, I’d like people to be able to use the plugin without having to modify their templates at all. I’d also like the plugin to allow filtering out one language if that is what the reader desires. I still hope that [Wordpress will one day “see the light” and let us define language at post-level](http://wordpress.org/extend/ideas/topic.php?id=1007 “Please vote!”) (Matt [saw the light for tagging](http://climbtothestars.org/archives/2007/09/22/wordpress-finally-has-tags/) ;-), so I do have hope). By the way, I stumbled upon this [Ajax Language Switcher for Basic Bilingual](http://www.freshlabs.de/journal/archives/2006/05/ajax-language-switcher-for-basic-bilingual/) earlier today, and it will probably greatly interest those courageous ones of you who tend to have translations of each post or page.

Back to the plugin. It installs normally (unzip everything in the /plugins directory). If you’re using other languages than French and English, you’ll have to manually change the language codes in the plugin file (not very difficult, you don’t have to know PHP to do it; just look for “en” and “fr” and put the language codes for your languages instead).

I’ve fixed an annoying problem with slashes that popped up at some point (somebody else gave me the fix, but I can’t remember who — let me know!).

But most of all, I’ve made the “other language excerpt” appear automatically in the post content. Yes, you hear me: no need to add <php bb_the_other_excerpt(); ?> in your templates anymore. Yay! Added bonus: it will show up in the feeds, too — for that reason, I’ve added a text separator between the excerpt and the post so that there is a separation between the languages.

Basic Bilingual in Google Reader

Obviously, you’ll want to hide these separators and style your posts a little. Here is roughly what I’m using right now:

.other-excerpt {
font-style: italic;
background: #fff;
padding-left: 1em;
padding-right: 1em;
border: 1px solid #ccc;
}

.other-excerpt:lang(fr) p.oe-first-child:before {
content: “[fr] “;
font-weight: bold;
}

.other-excerpt:lang(en) p.oe-first-child:before {
content: “[en] “;
font-weight: bold;
}

.bb-post-separator {
display: none;
}

div.hentry:lang(fr) .entry-title:after {
content: ” [fr] “;
vertical-align: middle;
font-size: 80%;
color: #bbb;
}

div.hentry:lang(en) .entry-title:after {
content: ” [en] “;
vertical-align: middle;
font-size: 80%;
color: #bbb;
}

Now, notice there is fancy stuff in there which relies on the lang attribute. If you’re mixing languages on a page, you should [use the lang attribute](http://www.w3.org/TR/html401/struct/dirlang.html#h-8.1) to indicate which language is where. This means (unfortunately, until I become buddies with PHP’s ob_start() function) that you need to touch your template. It’s not that hard, though.

Find the outermost <div> for each post in the template (it [should have the CSS class hentry, by now](http://microformats.org/wiki/hatom#Entry)). Add this inside the tag: lang="<?php bb_the_language(); ?>". Do so on every theme template which produces posts. With [the Sandbox theme](http://www.plaintxt.org/themes/sandbox/), it would look like this:

<div id="post-” class=”” lang=””>

That’s it!

If you’re using this plugin, please leave a link to your blog. I’m also always interested in hearing of other examples of multilingual blogging or multilingualism online.

Similar Posts:

Reminder: Speaking Tuesday at Web2Open, Berlin [en]

Reminder: Speaking Tuesday at Web2Open, Berlin [en]

[fr] Je présente une session sur le multilinguisme ici à Berlin, à l'occasion de Web2Open, mardi (demain!) à 10h10.

Just a reminder: I’ll be giving my talk [Waiting for the Babel Fish: Languages and Multilingualism](http://climbtothestars.org/archives/2007/08/09/another-multilingual-talk-proposal-web-20-expo-berlin/) Tuesday (tomorrow as of writing) at [10:10 during Web2Open](http://web2open.twiki.net/twiki/bin/view/Main/PreChosenSessions) at the Web2.0Expo in Berlin.

I also put together (for the occasion, but I’d been wanting to do it for a long time) a page entirely devoted to [my work about languages and multilingualism on the internet](/focus/multilingual). This is the first page of the [Focus series](/focus/) which will showcase some of my work and the areas I’m currently active in.

For those of you who’ve been intrigued by [this twitter of mine](http://twitter.com/stephtara/statuses/387658512) I’m going to make you wait a little more — but if we bump into each other at Web2.0Expo, don’t be shy to ask me about it!

**Update:** here’s the slideshow! Slightly upgraded since the [last incarnation of this talk at Google](http://climbtothestars.org/archives/2007/07/10/talk-languages-on-the-internet-at-google-tomorrow/):

Thanks to all those of you who came. I got lost on the way so arrived late — my apologies to any of you who might have been there on time and left before I arrived.

Similar Posts: