The page doesn't seem to quite spell out the answer, which is that lang and locale have nothing to do with each other. It's basically coincidence that they look even similar. The locale came from basically an ad-hoc system from X/Open in the late 80s, while lang comes from RFC 5646 in 2009. The two become more obviously different if you need to specify anything complicated, like sr_RS.UTF-8@latin or zh-cmn-Hans-CN.
numpad0today at 8:05 AM
> A language only tells you about the language. A locale, by contrast, tells you about the user's preferences.
I think it's more like, it just so happens that choosing language resources based on this pair of parameters is useful, because neither of these are particularly good boundaries.
There are people like Spanish speakers in the US, German speakers in Switzerland, Portuguese speakers in Brazil, things like that. So either of languages or flags alone is not enough, but combinations of both works 99% of the time. So that gets used.
trebligdivadtoday at 1:12 PM
I wish some Locale would treat _ and - as equivalent for searches and case-insensitive comparisons, so we could all stop worrying about which is the right one to use in many different places.
hibbeligtoday at 7:22 AM
I donât unterstand this. In order to write correct text i have to know some conventions, such as number formatting. So just language and locale are kind of hard to separate. Why dies the author say that the locale doesnât matter for strings in OGP metadata?
nubinetworktoday at 10:56 AM
> For example, this is valid HTML ...(snip)... That says the site's name is in French but the description is in English. That will parse perfectly.
Is this why I get websites that triggers google translate despite already being in my language, or why it only translates parts of the page?
IanCaltoday at 11:41 AM
> Is 5.99 describing the cost in a mark, a yen, a buck, or a pound?
Maybe Iâm missing a reference someone else mentioned but on the face of it this isnât a valid thing. Locale doesnât change the currency independently, or certainly shouldnât. If something is $5.99 when someone views it in Japan it should not be rendered as „5.99
Yes, you can use to choose what price to show someone but thatâs a different step, thatâs part of the request.
Edit - though whether 5.999 is almost six thousand or is under 6 could be a point.
bentleytoday at 7:47 AM
For English content I just use <html lang=en>: quiets the validator, makes no difference in rendering, so simple I donât even think about it.
sphtoday at 6:40 AM
I must say - great domain name.
deletedtoday at 7:03 AM
nathelltoday at 8:33 AM
> a Facebook recommendation is not the same as a living standard.
Sure itâs not. Remember how Facebook used to offer RSS feeds until 2015?
Conformance to standards (let alone development of standards) in the interest of interoperability is against the needs of a digital giant, unless it strengthens their hegemony. Itâs a variant of the âembraceâextendâextinguishâ tactic. It could be dubbed SSS: StandardizeâSupportâSubvert.