Phoenix Logo

phoenix_title wx.lib.langlistctrl

ListCtrl and functions to display languages and the flags of their countries

function_summary Functions Summary

BuildLanguageCountryMapping Builds a mapping of language ids to LANG_COUNTRY codes.
CreateLanguagesResourceLists Create a language resource list
GetLanguageFlag Create a language resource list
GetWxIdentifierForLanguage Get the wx identifier for a language.

class_summary Classes Summary

LanguageListCtrl wx.ListCtrl derived control that displays languages and flags

Functions



BuildLanguageCountryMapping()

Builds a mapping of language ids to LANG_COUNTRY codes.

Returns:the mapping as a {langID: countryCode}


CreateLanguagesResourceLists(filter=LC_AVAILABLE, only=())

Create a language resource list

Parameters:
  • filter – Filter the list of languages (LC_AVAILABLE, LC_ALL or LC_ONLY)
  • only – a tuple of language ids
Returns:

a tuple of (bitmaps, language descriptions, language ids)



GetLanguageFlag(lang)

Create a language resource list

Parameters:
  • filter – Filter the list of languages (LC_AVAILABLE, LC_ALL or LC_ONLY)
  • only – a tuple of language ids
Returns:

a tuple of (bitmaps, language descriptions, language ids)



GetWxIdentifierForLanguage(lang)

Get the wx identifier for a language.

Returns:The language id as a string