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?


2 Answers 2


You can use the undocumented option OfficialLanguages

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

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

  • $\begingroup$ how did you find the undocumented option? $\endgroup$
    – Zviovich
    Commented Mar 11, 2014 at 13:53
  • 1
    $\begingroup$ @PatoCriollo Honestly - just playing around :D $\endgroup$
    – Sektor
    Commented Mar 11, 2014 at 14:04
  • 1
    $\begingroup$ But I did :) $\endgroup$ Commented Mar 11, 2014 at 17:00
  • 1
    $\begingroup$ Xhosa is a very interesting language, due to its clicks. youtube.com/watch?v=KZlp-croVYw $\endgroup$
    – Zviovich
    Commented Mar 11, 2014 at 17:39
  • 1
    $\begingroup$ @m_goldberg Only Hindi and English are the official languages. Individual states can set their own official language... $\endgroup$
    – rm -rf
    Commented Mar 25, 2014 at 4:59

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"}}}*)
  • $\begingroup$ 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 $\endgroup$ Commented Mar 11, 2014 at 13:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.