Is there a
meta tag that gives the original language of a webpage, or some library I could use to detect it? For example:
==> DE (German)
==> JP (Japanese)
Best How To :
The language of both pages is, arguably, English! Much of the content on the page is in other languages, but the structure of the page (labels, links, etc) is English, and the meta tags on each page agree with this assessment.
From the Google Play page:
From the iTunes Store page:
<html prefix="og: http://ogp.me/ns#" xmlns="http://www.apple.com/itms/" lang="en">
There exist some APIs that can attempt to perform language detection. One such (commercial) example is Google Translate's Detect Language call. It's a bit of a tossup what such an API would make of these pages, though; there's a strong argument that they're both English.