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

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?



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

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:

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

Received on Tuesday, 17 September 2013 00:39:52 UTC