DZone
Web Dev Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Web Dev Zone > HTML5 To Get Translate Attribute, Bring World Closer Together

HTML5 To Get Translate Attribute, Bring World Closer Together

Chris Smith user avatar by
Chris Smith
·
Feb. 22, 12 · Web Dev Zone · Interview
Like (0)
Save
Tweet
11.01K Views

Join the DZone community and get the full member experience.

Join For Free
The W3C Open Web Platform Weekly Summary announced that HTML5 will receive a translate attribute with the goal of specifying pieces of text that should or should not be translated by machine translators.  This announcement continues the movement of improving semantics in HTML5, and was originally suggested on the W3C Bug/Issue Tracking Service:

Since this is becoming a widely-felt problem, it seems like a more formal solution than class="notranslate" is due. Based on the proposals above, I suggest that we add a translate="" global attribute to HTML, with two valid values, "yes" and "no", with the obvious semantics. The value would inherit to descendants, much like "lang". Invalid values (translate="foo", etc) would be ignored. A missing value (translate="") would be treated like translate="yes".

-- Ian Hixon
 
Here's how the translate attribute works:

<p lang="en">Mr <span translate="no">Hope</span> 
is speaking at…</p>
When translating from English to French, the string “Hope” will not be translated to “Espoir” in French.

-- W3C

It is worth noting that Google Translate has featured support for excluding text from translation for sometime, as has Microsoft Translator.  However, the hope is that HTML5 adopting such a practice will provide a standard approach.
HTML Attribute (computing)

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Regression Testing: Significance, Challenges, Best Practices and Tools
  • Learn the Weekly Rituals You Should Master as a Software Project Manager
  • How to Build a Simple CLI With Oclif
  • 8 Must-Have Project Reports You Can Use Today

Comments

Web Dev Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo