9

FeedBurner is an excellent tool for delivering your RSS feed and a newsletter. It’s reliable, easy to use, gives handy statistics and is free. I’ll show you how you can use FeedBurner to deliver multilingual feeds (and a multilingual newsletter).

1. Create different feeds for each language

You want visitors to receive news in their language only and not sent a whole mix of languages for them to choose from.

WordPress’ RSS feed is normally located in http://YOURBLOG/feed/ (see full details in the Codex for how to access your feed).

WPML will produce per language feeds in URLs that depend on your language negotiation scheme. Basically, it will be the language domain ending with feed/. For example, if you’re using languages per directories, your Spanish feed would be at http://mysites.com/es/feed/.

There are different formats for RSS feeds. We experimented and discovered that the standard WordPress /feed format produces invalid feeds when posts have non English characters.

What we’re using is http://YOURBLOG/es/feed/rdf/ which keeps all UTF-8 characters unchanged (and valid).

So, head over to your FeedBurner account and create a different feed per language.

Create a new FeedBurner feed

Create a new FeedBurner feed

1.1 Validate your new FeedBurner feed

This is optional, but highly recommended. After I create a new RSS feed, I validate it. I use the W3 Feed Validator. Among the errors that existed in my multilingual feeds were character encoding issues and bad names.

2. FeedBurner language setup

The BrowserFriendly screen under Optimize, lets you select the language for each feed page.

FeedBurner BrowserFriendly
FeedBurner BrowserFriendly

Click on Theme and select one that has the right language.

3. Displaying the right feed for each language

Your feed is normally added to the theme. Some people use the excellent FD FeedBurner plugin. Unfortunately, since it can accept only a single FeedBurner URL, you’ll have to roll up your sleeves and replace those RSS links manually. Don’t worry, it doesn’t bite.

What we did was to use GetText to localize the feed URL, just like other texts. Here is the code to put in the theme:

<a href="<?php _e('http://feeds2.feedburner.com/YOURFEED','YOUR_TEXT_DOMAIN'); ?>" >RSS</a>

Remember to replace YOURFEED and YOUR_TEXT_DOMAIN with real values. This text will be added to your theme’s .po file. Then, when translate it, enter URLs of the other language feeds. For example, this is what we have in the es_ES.po file (real URLs here, change for your own):

msgid "http://feeds2.feedburner.com/wpml"
msgstr "http://feeds2.feedburner.com/wpmles"

4. Localized email signup

Many people, us included, also use FeedBurner to deliver a newsletter. It’s just a copy of recent posts, delivered as an email. Since we write our news in our blog, we don’t see a special need to maintain a secret newsletter that gets sent only to newsletter subscribers.

The newsletter subscription process requires visitors to confront FeerBurner’s CAPTCHA. It’s difficult enough when it’s in your language, so why make it any more of a problem by presenting in a differnt language?

Luckily, FeedBurner lets you control which language will be used to display their sign-up confirmation page.

The raw FeedBurner email sign-up form looks like this:

<form action="http://feedburner.google.com/fb/a/mailverify" method="post">
Email: <input name="email" type="text" />
<input name="uri" type="hidden" value="YOURFEED_NAME" />
<input name="loc" type="hidden" value="en_US" />
<input type="submit" value="Subscribe" /> </form>

See that hidden input called “loc“? This is what controls the sign-up language. To have an Argentina Spanish sign-up form, enter value=”es_AR” in that tag. For German, enter “de_DE” (and so on).

Summary

We’ve created different FeedBurner feeds, one for each language. Then, we created a theme function that returns the correct feed URL based on the language and used that in our theme. Finally, if you’re also using an email subscription, we showed how to localize the subscription process.

Give it a try and let us know how it’s working out for you!

9 Responses to “Multilingual FeedBurner feeds and newsletters”

  1. How to go about to display the right email sign up for the right language? can I use some conditional in my sidebar. Say if language is English display form1 elseif language is Japanese display form2 else form 3

  2. If your sign up form is a text widget that appears in the sidebar, you can have its contents translated using WPML’s string translation.

    Click on WPML->String translation. At the bottom, you’ll see a list of checkboxes. Make sure they’re all selected and click on ‘Save’ (even if you didn’t change anything).

    Now, your text widget’s contents will be available for translation there. You can enter any URL you like in the translation.

    For the translation to work, the sidebar needs to have the widget filtering enabled. This is the case for the widgetized WP sidebar. If you’ve written your own, make sure that the sidebar’s contents first goes through the display filter.

  3. This doesn’t allow me the option of adjusting text in a custom theme, eg the footer links hardcoded into the footer file.

    Surely an ifelse statement as suggested above should be able to be created using a language output?

    If it needs to go through the display filter; what is this and how is it done?

    tia

  4. Thanks for the info… the “Enter your email box” is in Spanish… the captcha confirmation note is also in Spanish…
    The problem is the email that Feedburner sends to the new user to click to confirm their email is in English!
    How should I do to ask Feedburner to send the confirmation email in Spanis?
    Thanks!

    • Good suggestion. Since WPML allows you to translate text widget contents, this is a simple and effective way of doing it.

  5. For weeks I’ve tried to figure out how to do this with a language parameter rather than a “/en/” or “/fr/” directory. Finally I asked the following to Sayontan, author of the Suffusion theme:

    “When using the WPML plugin, my feeds come out wrong for my second language (e.g. 404 errors at http://mysite.com/article.htmlfeed/?lang=fr, and http://mysite.com/comments/feed/?lang=fr). The WPML crew say that users need to modify the theme to include a GetText call for the RSS feed(s). I’ve pasted their recommendation below. Based on that, do I have to go into the Suffusion code to replace the RSS links (and if so, which file?), or can this somehow be done on the theme’s configuration pages?”

    And Sayontan replied:

    “This is easier said than done. Suffusion makes use of WP’s inbuilt add_theme_support(‘automatic-feed-links’) call and doesn’t have explicit links defined for feeds, hence you will not see any place to modify the theme links. Unless there is a way to pass the language parameter to the add_theme_support call you don’t have an easy way out, I am afraid.”

    So while it seems easy to makes multilingual RSS feeds work for directories, this seems more complicated when using language parameters. Is there a non-invasive way to do #3 above with my setup? I realize that redirects are an option, but if there’s a better way, I’m all ears.

    Thanks!

  6. I have done all this, have a separate feed for each language and have used the Dynamic Widgets plugin to display the correct subscription form for each language.

    However, I would like to also have a popup subscription form and this is a problem for the separate languages. Is there a way to make a plugin show different popups for each language or is there a specific popup plugin that is compatible with WPML? I have been searching for one for weeks and have yet to find anything with the capability of showing the right popup for each language. Any suggestions? Thanks!

    • It sounds like a possible thing. To make sure, I suggest that you start a new thread in our support forum. Explain what you’re doing and how you’re doing it and our support people can help you with guidelines for implementation in multiple languages.