Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • ...says that the content within the scope of the element on which it resides is in that language (expressed as an ISO code).
    They can also be RFC3066 language tags [cpan.org], like fr-CA-joual or i-mingo (which are not ISO codes)

    ...and it is smart enough to know that fr_CA is fr
    Doesn't it have to be "fr-CA" instead? "_" is for locales, "-" is for language tags.

    • You are entirely right [w3.org] :)

      For the ISO code part, I was using loose terminology (ie I'd heard that it wasn't restricted to ISO but hadn't looked much further), the XPath spec defined matching patterns in the simplest way (that is, a code will match anything on - or end boundaries).

      For the locale part, I got mixed up wanting to quote from the perllocale manpage (especially the part about dividing the world into nations instead of, say, "bankers, bikers, gamers, and so on") but forgot to :)

      Thanks for being vigilant!

      --

      -- Robin Berjon [berjon.com]