title: Howto get the language name for a given locale in linux
body: <p>This is pretty much <a href="https://stackoverflow.com/questions/3338279/find-out-default-language-on-linux">This question</a> with a bit more information. My goal is to work out the languages installed in the system.</p>
  
  <p>The following command</p>
  
  <pre><code>locale -a 
  </code></pre>
  
  <p>displays all the languages (in a format such as en_AU.utf8). This seems to correspond to the contents of /usr/lib/locale.</p>
  
  <p>Furthermore, invoking</p>
  
  <pre><code>LANG=fr_FR.utf8 locale -ck LC_IDENTIFICATION
  </code></pre>
  
  <p>Gives information of that particular locale which includes the language name (Which in this case is French).</p>
  
  <p>This seems to be the information contained in /usr/lib/locale/fr_FR.utf8/LC_IDENTIFICATION.</p>
  
  <p>Is there a way (maybe an API call) to obtain this info? I looked at the source of the locale utility but it uses a private struct.</p>