2005.03.21 04:57 PM

Invalid TypePad RSS

The default TypePad RSS template uses the $MTBlogLanguage$ tag for the dc:language element, like so:

<dc:language><$MTBlogLanguage$></dc:language>

This tag appears to be populated based on the selected "Language for display" option on the weblog's Configure tab:

Here's a quick look at the values TypePad provides for the dropdown:

<select name="date_language" id="date_language" class="menu">
  <option value="ar">Arabic</option>
  <option value="de_AT">Austrian</option>
  <option value="zh_CN">Chinese</option>
  <option value="cs_CZ">Czech</option>
  <option value="da_DK">Danish</option>
  <option value="nl_NL">Dutch</option>
  <option value="en_US" selected="selected">English (U.S.)</option>
  <option value="en_GB">English (U.K.)</option>
  ...
</select>

Unfortunately, these aren't valid language codes, at least not the two-part ones.

The RDF Site Summary (RSS) Dublin Core (dc) module's language element expects values based on RFC 1766, which specifies a two letter code taken from ISO 639, optionally followed by a two letter country code taken from ISO 3166. If one opts to include the optional two letter country code, it is expected to be preceded with a dash ("-"), not an underscore ("_").

For those of us using a two-part language selection, like English (U.S.), and the default TypePad RSS template, the end result of all this is an invalid RSS feed containing "en_US" instead of "en-US" (per rss.scripting.com):

I've opened a ticket with TypePad support. In the meantime, getting valid is pretty simple. I just modified the RSS template to include a hardcoded language value, like so:

<dc:language>en-US</dc:language>

Now I can share the love.

Valid RSS feed.


Comments

The latest from TypePad support:

"Our team is looking into this more, thanks again for the report. We've seen several other users reporting this since then, although it's not happening for everyone. The best solution right now is the one you used - hard coding the en-US into the feed rather than relying on the template tag."

ewbi.develops | 2005.04.05 08:06 PM


TrackBack

TrackBack URL:  https://www.typepad.com/services/trackback/6a00d8341c7bd453ef00d8346f850f69e2

Listed below are links to weblogs that reference Invalid TypePad RSS: