<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>23512</bug_id>
          
          <creation_ts>2013-10-14 21:43:29 +0000</creation_ts>
          <short_desc>API to expose actual language of a node, to aid scripts doing localisation and CJK editors during copy&amp;paste and drag&amp;drop</short_desc>
          <delta_ts>2017-07-21 11:01:07 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>Needs Impl Interest</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ian &apos;Hixie&apos; Hickson">ian</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>annevk</cc>
    
    <cc>ian</cc>
    
    <cc>marcosscaceres</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>94717</commentid>
    <comment_count>0</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-10-14 21:43:29 +0000</bug_when>
    <thetext>On Sat, 13 Jul 2013, Peter Occil wrote:
&gt; &gt; &gt;
&gt; &gt; &gt; a DOM attribute like &quot;language&quot; [...] since it&apos;s not currently
&gt; &gt; &gt; possible to get the language of a node through JavaScript [...]
&gt;
&gt; There are several use cases:
&gt;
&gt; - Localization of form controls in languages where browser support
&gt;   is lacking, such as some minor languages.
&gt; - Localization of HTML elements, especially date formatting of span
&gt;   and div elements in the page&apos;s default language.
&gt;
&gt; When it comes to retrieving the language of an element, a JavaScript
&gt; implementation can do everything except retrieve the value of the
&gt; Content-Language header of the document, so even providing a DOM attribute
&gt; like &quot;contentLanguage&quot; will resolve this issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94721</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-10-14 22:02:45 +0000</bug_when>
    <thetext>Another use case Ryosuke Niwa mentioned is editors; they need to know the language of text when copying or dragging or pasting or dropping, so that CJK text ends up rendered correctly.

See Ryosuke&apos;s e-mails here:
   http://lists.w3.org/Archives/Public/public-whatwg-archive/2013Aug/0015.html
   http://lists.w3.org/Archives/Public/public-whatwg-archive/2013Aug/0093.html
   http://lists.w3.org/Archives/Public/public-whatwg-archive/2013Aug/0152.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96896</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-11-27 23:56:27 +0000</bug_when>
    <thetext>See also comments from Elliott, dbaron, and Anne, which talk about how this is implemented as an internal CSS property by browsers and the implications thereof:
   http://lists.w3.org/Archives/Public/public-whatwg-archive/2013Sep/0199.html
   http://lists.w3.org/Archives/Public/public-whatwg-archive/2013Sep/0201.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125593</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2016-03-22 14:49:10 +0000</bug_when>
    <thetext>Main problem I see: I don&apos;t see how this squares with WebKit/Chromium&apos;s strategy of doing language inheritance through CSS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128755</commentid>
    <comment_count>4</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2017-07-21 11:01:07 +0000</bug_when>
    <thetext>If this is still desired, please file a new issue at https://github.com/whatwg/html/issues/new.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>