Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 8 down vote accepted

You can use the undocumented option OfficialLanguages

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

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

share|improve this answer
    
how did you find the undocumented option? –  Zviovich Mar 11 at 13:53
1  
@PatoCriollo Honestly - just playing around :D –  Sektor Mar 11 at 14:04
1  
But I did :) –  belisarius Mar 11 at 17:00
1  
Xhosa is a very interesting language, due to its clicks. youtube.com/watch?v=KZlp-croVYw –  Zviovich Mar 11 at 17:39
1  
@m_goldberg Only Hindi and English are the official languages. Individual states can set their own official language... –  rm -rf Mar 25 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"}}}*)
share|improve this answer
    
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 –  belisarius Mar 11 at 13:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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