Language Tags

I was recently asked:

The Ethnologue website says that the language code for Nepali is nep, but Scriptoria is using ne. Why is it different?

There are various standards for language codes. The Ethnologue website uses ISO 639-3. It define three-letter codes to identify languages.

SIL Language Software (LSDev) follows the recommendation from SIL Writing Systems Technology (WSTech) to use BCP 47. WSTech maintains a language tag JSON dataset which is used by Scriptoria to provide data for the language search dropdown.

Here is an example entry for Nepali from their dataset:

{
	"full": "ne-Deva-NP",
	"iana": [
		"Nepali (macrolanguage)"
	],
	"iso639_3": "nep",
	"latnnames": [
		"Nepālī"
	],
	"localname": "नेपाली",
	"localnames": [
		"नेपाली"
	],
	"name": "Nepali (macrolanguage)",
	"names": [
		"Eastern Pahadi",
		"Eastern Pahari",
		"Gorkhali",
		"Gurkhali",
		"Khaskura",
		"Lhotshammikha",
		"Nepalese",
		"Nepali",
		"Parbate",
		"Parbatiya"
	],
	"region": "NP",
	"regionname": "Nepal",
	"regions": [
		"AU",
		"BN",
		"BT",
		"FI",
		"GB",
		"US"
	],
	"script": "Deva",
	"sldr": true,
	"suppress": true,
	"tag": "ne",
	"tags": [
		"ne-Deva",
		"ne-NP",
		"npi",
		"npi-Deva",
		"npi-Deva-NP",
		"npi-NP"
	],
	"windows": "ne-NP"
}

When you search for language code in Scriptoria, you search many of these fields and it shows matches. When you select one, it uses the tag field as the language code.

Chris