Help - Search - Members - Calendar
Full Version: Anyone have experienced multilingual entries?
Movable Type Community Forum > Additional Resources > Tips and Tricks
Gauthier
Hello, I'm just diving into Movable Type and I'm wondering if anyone have experienced multilingual entries for blogging?

I just think about some solutions to manage this

For example with custom server side processing of entries, I use asp.net but I think the same is possible with any other server side tool.

For instance I will have custom server side controls that will look like when templates are built:
CODE
<blog:multilingualentry runat="server">
<blog:entry runat="server" language="fr">Le contenu de mon entrée</blog:entry>
<blog:entry runat="server" language="en">The content of my entry</blog:entry>
</blog:multilingualentry>


I've also thinked about a client side only solution with css with such selectors
CODE
.frenchcontent { display: none }

and just switching the css that's used.

BTW This solution seems better because it didn't need any server side processing apart switching the right css, and search engines will index every language present in the pages.

The problem going with one these solution would be to manage the titles for the entries: does I'm alowed to use markup in the title field?

The last solution will simply to make the whole content displayed in multiple languages, anyway I only write french and english so it will not be too heavy for the readers.

I'm just interesting in feedback from persons that allready blog in a multilingual fashion?

So does anyone has experience in this area?

Thanks
a_k_c
This is interesting. I don't have useful tips to offer, though I do run a mostly trilingual blog (tetra- if counting a fourth language I know half-well). For that language I created a category to highlight it.

The ideal solution, content-wise, would be to have lang tags for each entry. The assumption here is that most entries will have one dominant language. (In reality, of course, people switch back and forth even in writing.) I think advanced search engine bots would be happy to have data so finely labeled for them to chew on. And many HTML tags theoretically accept lang attributes (and charset, too!). I think Lang tags are particularly important because I blog in UTF-8 and that could be any of many scripts and even more languages.

But how to hide one language content and show another?? CSS + cookie sounds nice. Less gracefully one could stuff second-language content into extended entry (and change "read more" to "read this in Y-ish".

As for title, I'm guessing you could have alternative DIV's , though I haven't tried.
Gauthier
First thanks for your feedback and also cheer for you writing a three/four linguistic blog.

As for lang tags, I think that you talk about the lang and xml:lang attribute, am I right?
I also didn't see tags available but I'm not so good reading w3 recommandations.

So I don't have any idea of wich tag will enclose these contents, I would first think about
but I allready overuse them for presentational divisions and I'm not sure it's the best choice for the purpose of separating the contents in different languages, did anyone have any recommandation instead of using:
CODE
<div xml:lang="fr">Mon contenu</div>
<div xml:lang="en">My content</div>

(I plan to use XHTML 1.1 for my content)

Subsidiary question: Did I have a solution to avoid class attribute use on my markup and still use css selectors that check for xml:lang or lang attribute? Or Am I better to also use a class name like my first css selector exemple in my original post?

As for markup in the title field, I just tested and it seems to work seamlessly smile.gif

Another intersting point would be the generation of several rss feeds for multiple languages. Because most of us seems to switch to aggregators for reading blogging content and I think that readers would be glad to have a stripped down feed with only their native language plus the default one that I choose when the one their choose is not (allready) available.

It's mostly there that I think about a 'second layer' of server side code (what I call generating server side scripting language with Movable Type templates) would be interesting, it can also help to keep consistency (if any needed) between the disposition of the languages (such as default language if translation is not available or other nice things) as well as providing another layer of flexibility, but I also think that a whole topic on his own and that there is no generalist solution, but it would be cool to swap some ideas on this topic too.
claude
I have been thinking about (and implementing) multilingual sites for some time now. This is not an easy subject.

- Client side - CSS: I like this but as the number of languages increases, the document size increases too. And if the client does not support CSS, he sees all the languages.

- Server-side: My previous personal site was bilingual and I used this approach (my machine broke not long ago and I still have'nt had the time to import all of it from blogger into my new MT site). Each post had 1 large div block per language and I would parse the request to only return the appropriate one.

Both these approaches require writing multiple languages in one post. After using this for a while, I find it error-prone as it is easy to make mistakes when writing the XML language blocks. Also, sharing the same templates for all languages adds another layer of complexity.

I am also new to MT and I just wrote a plugin that I think can be useful to build multilingual sites. Here is the strategy:

- Create one blog per supported language

- Use the plugin (let's call it MTRelatedEntry) to synchronize the creation and cross-reference of entries in all supported languages .

- Use the plugin to display links to other available versions of each entry.

So far, I like this better. Each version is separate but the entries in all languages have a match in the other language. When the original entry is published, an entry is created in the other languages. By default this entry's title can be "Version françise de 'My english post'". It can be published right away with a link to the english version, or saved as a draft and translated later.

Any way, this reply is long enough for now...

See http://www.montpetit.net for a sample use of this tag (note that the templates are not yet translated to French.)

What do you think of this type of solution?
wollew
QUOTE (claude @ Aug 2 2003, 03:35 PM)
I am also new to MT and I just wrote a plugin that I think can be useful to build multilingual sites. Here is the strategy:

- Create one blog per supported language

- Use the plugin (let's call it MTRelatedEntry) to synchronize the creation and cross-reference of entries in all supported languages .

- Use the plugin to display links to other available versions of each entry.

[...]

So far, I like this better. Each version is separate but the entries in all What do you think of this type of solution?

I like your solution. A lot.
Now where can I get the plugin, I don't feel like reinventing the wheel wink.gif
Jeroen Sangers
MTRelatedEntry can be found on kalsey.com, but I don't see how this can help.

Another tip: if you use a separate weblog for each item, you could specify the language in the filename line entry_title.html.en and entry_title.html.fr. If your files are named like this, you can use Apache's MultiViews option to automatically serve the right language. Read more about this on the Apache Content Negotiation page.
claude
I will have the plugin on my website asap (today).

http://www.montpetit.net

I am actually using it on this site and I like this approach better after having tried other models.

Update: Here is the link to the plugin:
http://www.montpetit.net/en/2003/08/27/11h...1h55/index.html
claude
QUOTE
you can use Apache's MultiViews option to automatically serve the right language

Yes, that is true. Personally, I like having the language as part of the URL so I can switch to another language without having to change my browser settings. A mix of both is nice: Use Apache to identify the default language, and URLs with language IDs so users can switch.

Also, MTRelatedEntries does not work the way MTRelatedEntry does. I could change the name to avoid any confusion.
wollew
QUOTE (claude @ Aug 27 2003, 05:08 PM)
QUOTE
you can use Apache's MultiViews option to automatically serve the right language

Yes, that is true. Personally, I like having the language as part of the URL so I can switch to another language without having to change my browser settings. A mix of both is nice: Use Apache to identify the default language, and URLs with language IDs so users can switch.

Also, MTRelatedEntries does not work the way MTRelatedEntry does. I could change the name to avoid any confusion.

Yes, a combination of both is what a like best, too. Seems like we both want to have our blog configured the same way, lucky me you did it first smile.gif
BTW, thanks for putting your plugin on your site so fast, best of all: including documentation!
holiday
QUOTE
- Create one blog per supported language


If your creating a new blog in another language what's the need for a plugin or anything else? Just put a link to that blog. Or am I missing the boat?

I am trying to go bilingual in my blog, so far I am thinking just to duplicate my main blog and change it all over to another language, though I wish there was a simplier way.
claude
QUOTE
If your creating a new blog in another language what's the need for a plugin or anything else?

The plugin is useful to synchronize the creation of entries in each language. Each time you create and publish an entry in one language (in one blog), a matching entry is created in the other language blog(s). The created entry in the other blog can either be a draft, or it can be published with dynamically generated content.

The plugin can also be used to switch the context to the other entry. For example, when viewing an entry in a given language, you may want to also display the title of the matching other language entry by switching to this context. This is how it would be done:
CODE
... english entry context ...
<MTRelatedEntry blog_id="2">
   Title in spanish: <$MTEntryTitle$>
</MTRelatedEntry>
... back to english entry context ...

This plugin is only useful if you want a 1 to 1 match between 2 language blogs. If both versions are independant, or if you just need to associate entries once in a while, the plugin is of no help and you are better off manually linking items.

Claude
holiday
I see.


OK here's what I am doing. W.blogger and Systran 4.0 (using Clipboard Taskbar).

W.blogger will publish to more than one blog and I just have to cut n paste on the same page (via Systran Clipboard) to get the same blog entry in a different language.

If you can afford Systran Translator I think this is the way to go. smile.gif
Cornelis Kolbach
QUOTE
I've also thinked about a client side only solution with css with such selectors
CODE
.frenchcontent { display: none }

and just switching the css that's used.

Perhaps the article 'multi lingual website, a different approach' on www.cornae.org might be of interest to you. It proposes a client side solution using the lang attribute.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.