4

According to Wikipedia

Of the 193 widely recognized countries, 178 have an official language at the national level

(NB:or more than one)

The only exceptions are:

Cyprus, Czech Republic, Denmark, Eritrea, The Holy See, Luxembourg, San Marino, Sweden, Tuvalu, Ukraine, United Kingdom, United States, Uruguay, Uzbekistan, and Yemen

CountryData[] supports three language related properties:

"Languages", "LanguagesDialects", "LanguagesFractions"

But none of them seems to return the "Official Languages".

Is there a way to get a country's official languages within Mathematica?

Dr. belisarius
  • 115,881
  • 13
  • 203
  • 453

2 Answers2

10

You can use the undocumented option OfficialLanguages

CountryData["Republic of South Africa", "OfficialLanguages"]

{"Afrikaans", "English", "IsiZulu", "IsiXhosa", "Sepedi", "Swati", "Ndebele", "Sesotho", "Xitsonga", "Setswana", "Venda"}

Sektor
  • 3,320
  • 7
  • 27
  • 36
2

what about.

    {#, WolframAlpha[
        StringJoin["Official Language ", #], {{"Result", 1}, 
         "ComputableData"}]} & /@ {"Argentina", "Belgium", "Belarus", 
      "Ireland", "Ukraine"}
     (*{{"Argentina", {"Spanish"}}, {"Belgium", {"Dutch", "French", 
        "German"}}, {"Belarus", {"Belarusan","Russian"}}, {"Ireland",{"English",""}}, {"Ukraine", {"Ukrainian"}}}*)
Zviovich
  • 9,308
  • 1
  • 30
  • 52
  • Please try with China or Bolivia (and compare with the corresponding Wikipedia entries). They are making the world's data computable, but they aren't still there – Dr. belisarius Mar 11 '14 at 13:35