The locale is of course something else than the language (a concept that confuses many people and I explain in great detail in this post on StackOverflow). A locale is always specific for a country. However, the first part of a locale is the language, so it’s perfectly acceptable to use some string manipulation to extract that part.
We have two major “dutch” languages (dialects): Dutch and Flemish.
One of them is often written as nl_BE
(Netherlands_Belgium), the other is nl_NL
(Netherlands_Netherlands).
The locale is often defined as (and correct me if I’m wrong) language[_territory]
.
So we get stuff like en_IE
(Irish English), en_US
(USA English) and en_GB
(Great Britain’s English).
Hope this explanation helps