Re: [w3ctag/design-reviews] Serialization of natural language in data formats such as JSON [I18N] (#178)

Having the `lang`/`dir` values span both `title` and `description` is problematic, not because it doesn't cover postcode, but because the title and description may be in different languages.  This is why we have also long wished there was an alternative to having one `lang` attribute in HTML to cover both the element content and the attribute values (and why, more generally, we advise avoiding natural language text in attribute values when designing markup languages).

Having said that, markup like HTML can be useful in that the content author doesn't need to specify the language for every element – the language is inherited from higher up the hierarchy. This is not so easy for JSON-like formats, but would be useful if it's possible.  For example, it may be possible to declare the language for all the strings in A in the way you did, but this would only work if it were possible to override that for a particular string when needed.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/178#issuecomment-332784563

Received on Thursday, 28 September 2017 09:41:31 UTC