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

Peter Occil poccil14 at gmail.com
Mon Sep 16 17:38:47 PDT 2013


Apparently, the use cases I mentioned before have not been discussed yet:

"
- Localization of form controls in languages where browser support
is lacking, such as some minor languages.
- Localization of HTML elements, especially date formatting of span
  and div elements in the page's default language, see especially [1].
"
You said these use cases were valid; how do you think so?

--Peter

[1]: 
http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#input-impl-notes

-----Original Message----- 
From: Ian Hickson
Sent: Monday, September 16, 2013 6:05 PM
To: Jukka K. Korpela
Cc: whatwg at lists.whatwg.org
Subject: Re: [whatwg] HTML: A DOM attribute that returns the language of a 
node

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