Making some of the iso-codes data available through high-level functions
@swilmet
Submitted by Sébastien Wilmet Link to original bug (#680876)
Description
Applications often need to display the name of a language. For example the en_US code corresponds to the name "English (United-States)".
There are two parts: the language (English), and the country (United-States). It makes sense to be able to get the two names separately. The language should always exist, but the country is optional.
To be more convenient, it also makes sense to have the full name, with the country in parentheses. I think that's the common way to display it.
So the API would consist of these functions, or similar names:
pango_language_get_language_name() pango_language_get_country_name() pango_language_get_full_name()
The iso-codes can be used for the implementation. More precisely, ISO-639 for the language names, and ISO-3166 for the country names.
gtkhtml has an implementation for fetching the names from the iso-codes:
http://git.gnome.org/browse/gtkhtml/tree/components/editor/gtkhtml-spell-language.c