[whatwg] HTML: A DOM attribute that returns the language of a node

Ian Hickson ian at hixie.ch
Mon Sep 16 15:05:48 PDT 2013


On Fri, 2 Aug 2013, Jukka K. Korpela wrote:
> 2013-08-02 2:43, Ryosuke Niwa wrote:
> > > 
> > > Are you saying that for HTML contenteditable-based editors that want 
> > > to support drag-and-drop editing, they need to be able to annotate 
> > > the outgoing HTML fragment with the effective language so that when 
> > > it's embedded somewhere, the right fonts get used?
> > 
> > Yes, but not just for drag and drop.
> 
> This would mean that the editor would have to guess the language from 
> the text or ask the user to specify it.

Well presumably just getting the language out of the document would be a 
good first step.


> This is not as unrealistic as it may first seem. Microsoft Word does 
> such things [...]

Sure, there's plenty of examples of language identification.


> But regarding the effect of language markup on fonts, the effect is 
> limited to situations where the font is not specified in a style sheet.

Yes. That's a case we should probably make sure we handle.


> So it could be added, well, just because there is no good reason not to.

There's always reasons not to add something:

   http://wiki.whatwg.org/wiki/FAQ#Where.27s_the_harm_in_adding.E2.80.94

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list