4
$\begingroup$

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?

$\endgroup$

2 Answers 2

10
$\begingroup$

You can use the undocumented option OfficialLanguages

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

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

$\endgroup$
11
  • $\begingroup$ how did you find the undocumented option? $\endgroup$
    – Zviovich
    Mar 11, 2014 at 13:53
  • 1
    $\begingroup$ @PatoCriollo Honestly - just playing around :D $\endgroup$
    – Sektor
    Mar 11, 2014 at 14:04
  • 1
    $\begingroup$ But I did :) $\endgroup$ 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
    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
    Mar 25, 2014 at 4:59
2
$\begingroup$

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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