Semantic Markup for Foreign Language Terms? (4 posts)

  1. hughbiquitous
    Posted 10 years ago #

    If you use a foreign-language term (e.g., when you want to say "for example," you're technically supposed to write e.g. in italics because it's Latin - exempli gratia), what should your markup be?

    Should you use:

    <i lang="latin">e.g.</i>

    ... or ...

    <span style="font-style: italic" lang="latin">e.g.</span>

    ... or something else?

    Even here, typing this into the textbox, the only tag that is available to me is <em>, but that's semantically misleading - it's not emphasis... I'm not sure what it is, though...

  2. delFUEGO
    Posted 10 years ago #

    I think you should use the tag "Acronym" using the "lang" and "xml:lang" attributes in this case:

    <acronym title="exempli gratia" lang="li" xml:lang="li" >e.g.</acronym>

    PS: "li" = Latin

  3. hughbiquitous
    Posted 10 years ago #

    Thanks for the tip on the proper lang attribute for Latin. I confess I didn't look that up...

    But what about the case where I have a word that's not an acronym? Really, now that I think about it, it goes beyond just foreign language words...

    How should one semantically mark up things like:

    "Capt. James T. Kirk of the Enterprise resorted to ad hominem attacks against his enemies."

    "Enterprise" is the name of a vessel.
    "Ad hominem" is Latin.

    Wikipedia has some remarks worth noting...

  4. notthatugly
    Posted 10 years ago #

    Personally, I always use <i> for non-English phrases, because as you say <em> is unsemantic. Italicising foreign words is just a typographical convention, so gets a purely presentational tag. For titles I use <cite>, which may not be a perfect solution but is the best I have been able to find.

Topic Closed

This topic has been closed to new replies.

About this Topic