wxRuby Documentation Home

# Internationalisation

wxRuby includes support for writing multilingual applications. If you
write applications using only English ASCII characters, it should be
transparent. However, if you wish to display or work with accented
letters, or characters from other writing systems, this page provides a
brief explanation of how this is handled in wxRuby.

## Font encoding

wxRuby uses UTF-8 internally for all strings. Any string passed into
wxRuby for use in the interface (for example, as a window title or in
TextCtrl content) should be in UTF-8 format. This has several
implications. If the string is a literal within Ruby code, and the
string contains non-ASCII characters, you should ensure that your Ruby
code is declared to be in UTF-8:

1. Place at start of program to tell ruby this script is written in
2. UTF-8 encoded text.
   $KCODE = ‘u’

If the string is being read from a file or other source, and may contain
non-ASCII characters you should ensure that it is in UTF-8 format before
passing it into wxRuby; Ruby’s standard ‘iconv’ library may be used
for this purpose.

The default encoding for the user’s OS can be discovered by using
the `get_default_encoding_name` method supplied by the
Locale class.

## Supported Languages

The following Ruby constants define supported languages in wxRuby. The
user’s default language can be discovered by using the
`get_default_language` method from the Locale class.

1. user’s default language as obtained from the operating system
   Wx::LANGUAGE_DEFAULT

1. Unknown language, returned if language detection fails
   Wx::LANGUAGE_UNKNOWN

1. user defined languages’ integer identifiers should start from here
   Wx::LANGUAGE_USER_DEFINED

1. Known languages
   Wx::LANGUAGE_ABKHAZIAN
   Wx::LANGUAGE_AFAR
   Wx::LANGUAGE_AFRIKAANS
   Wx::LANGUAGE_ALBANIAN
   Wx::LANGUAGE_AMHARIC
   Wx::LANGUAGE_ARABIC
   Wx::LANGUAGE_ARABIC_ALGERIA
   Wx::LANGUAGE_ARABIC_BAHRAIN
   Wx::LANGUAGE_ARABIC_EGYPT
   Wx::LANGUAGE_ARABIC_IRAQ
   Wx::LANGUAGE_ARABIC_JORDAN
   Wx::LANGUAGE_ARABIC_KUWAIT
   Wx::LANGUAGE_ARABIC_LEBANON
   Wx::LANGUAGE_ARABIC_LIBYA
   Wx::LANGUAGE_ARABIC_MOROCCO
   Wx::LANGUAGE_ARABIC_OMAN
   Wx::LANGUAGE_ARABIC_QATAR
   Wx::LANGUAGE_ARABIC_SAUDI_ARABIA
   Wx::LANGUAGE_ARABIC_SUDAN
   Wx::LANGUAGE_ARABIC_SYRIA
   Wx::LANGUAGE_ARABIC_TUNISIA
   Wx::LANGUAGE_ARABIC_UAE
   Wx::LANGUAGE_ARABIC_YEMEN
   Wx::LANGUAGE_ARMENIAN
   Wx::LANGUAGE_ASSAMESE
   Wx::LANGUAGE_AYMARA
   Wx::LANGUAGE_AZERI
   Wx::LANGUAGE_AZERI_CYRILLIC
   Wx::LANGUAGE_AZERI_LATIN
   Wx::LANGUAGE_BASHKIR
   Wx::LANGUAGE_BASQUE
   Wx::LANGUAGE_BELARUSIAN
   Wx::LANGUAGE_BENGALI
   Wx::LANGUAGE_BHUTANI
   Wx::LANGUAGE_BIHARI
   Wx::LANGUAGE_BISLAMA
   Wx::LANGUAGE_BRETON
   Wx::LANGUAGE_BULGARIAN
   Wx::LANGUAGE_BURMESE
   Wx::LANGUAGE_CAMBODIAN
   Wx::LANGUAGE_CATALAN
   Wx::LANGUAGE_CHINESE
   Wx::LANGUAGE_CHINESE_SIMPLIFIED
   Wx::LANGUAGE_CHINESE_TRADITIONAL
   Wx::LANGUAGE_CHINESE_HONGKONG
   Wx::LANGUAGE_CHINESE_MACAU
   Wx::LANGUAGE_CHINESE_SINGAPORE
   Wx::LANGUAGE_CHINESE_TAIWAN
   Wx::LANGUAGE_CORSICAN
   Wx::LANGUAGE_CROATIAN
   Wx::LANGUAGE_CZECH
   Wx::LANGUAGE_DANISH
   Wx::LANGUAGE_DUTCH
   Wx::LANGUAGE_DUTCH_BELGIAN
   Wx::LANGUAGE_ENGLISH
   Wx::LANGUAGE_ENGLISH_UK
   Wx::LANGUAGE_ENGLISH_US
   Wx::LANGUAGE_ENGLISH_AUSTRALIA
   Wx::LANGUAGE_ENGLISH_BELIZE
   Wx::LANGUAGE_ENGLISH_BOTSWANA
   Wx::LANGUAGE_ENGLISH_CANADA
   Wx::LANGUAGE_ENGLISH_CARIBBEAN
   Wx::LANGUAGE_ENGLISH_DENMARK
   Wx::LANGUAGE_ENGLISH_EIRE
   Wx::LANGUAGE_ENGLISH_JAMAICA
   Wx::LANGUAGE_ENGLISH_NEW_ZEALAND
   Wx::LANGUAGE_ENGLISH_PHILIPPINES
   Wx::LANGUAGE_ENGLISH_SOUTH_AFRICA
   Wx::LANGUAGE_ENGLISH_TRINIDAD
   Wx::LANGUAGE_ENGLISH_ZIMBABWE
   Wx::LANGUAGE_ESPERANTO
   Wx::LANGUAGE_ESTONIAN
   Wx::LANGUAGE_FAEROESE
   Wx::LANGUAGE_FARSI
   Wx::LANGUAGE_FIJI
   Wx::LANGUAGE_FINNISH
   Wx::LANGUAGE_FRENCH
   Wx::LANGUAGE_FRENCH_BELGIAN
   Wx::LANGUAGE_FRENCH_CANADIAN
   Wx::LANGUAGE_FRENCH_LUXEMBOURG
   Wx::LANGUAGE_FRENCH_MONACO
   Wx::LANGUAGE_FRENCH_SWISS
   Wx::LANGUAGE_FRISIAN
   Wx::LANGUAGE_GALICIAN
   Wx::LANGUAGE_GEORGIAN
   Wx::LANGUAGE_GERMAN
   Wx::LANGUAGE_GERMAN_AUSTRIAN
   Wx::LANGUAGE_GERMAN_BELGIUM
   Wx::LANGUAGE_GERMAN_LIECHTENSTEIN
   Wx::LANGUAGE_GERMAN_LUXEMBOURG
   Wx::LANGUAGE_GERMAN_SWISS
   Wx::LANGUAGE_GREEK
   Wx::LANGUAGE_GREENLANDIC
   Wx::LANGUAGE_GUARANI
   Wx::LANGUAGE_GUJARATI
   Wx::LANGUAGE_HAUSA
   Wx::LANGUAGE_HEBREW
   Wx::LANGUAGE_HINDI
   Wx::LANGUAGE_HUNGARIAN
   Wx::LANGUAGE_ICELANDIC
   Wx::LANGUAGE_INDONESIAN
   Wx::LANGUAGE_INTERLINGUA
   Wx::LANGUAGE_INTERLINGUE
   Wx::LANGUAGE_INUKTITUT
   Wx::LANGUAGE_INUPIAK
   Wx::LANGUAGE_IRISH
   Wx::LANGUAGE_ITALIAN
   Wx::LANGUAGE_ITALIAN_SWISS
   Wx::LANGUAGE_JAPANESE
   Wx::LANGUAGE_JAVANESE
   Wx::LANGUAGE_KANNADA
   Wx::LANGUAGE_KASHMIRI
   Wx::LANGUAGE_KASHMIRI_INDIA
   Wx::LANGUAGE_KAZAKH
   Wx::LANGUAGE_KERNEWEK
   Wx::LANGUAGE_KINYARWANDA
   Wx::LANGUAGE_KIRGHIZ
   Wx::LANGUAGE_KIRUNDI
   Wx::LANGUAGE_KONKANI
   Wx::LANGUAGE_KOREAN
   Wx::LANGUAGE_KURDISH
   Wx::LANGUAGE_LAOTHIAN
   Wx::LANGUAGE_LATIN
   Wx::LANGUAGE_LATVIAN
   Wx::LANGUAGE_LINGALA
   Wx::LANGUAGE_LITHUANIAN
   Wx::LANGUAGE_MACEDONIAN
   Wx::LANGUAGE_MALAGASY
   Wx::LANGUAGE_MALAY
   Wx::LANGUAGE_MALAYALAM
   Wx::LANGUAGE_MALAY_BRUNEI_DARUSSALAM
   Wx::LANGUAGE_MALAY_MALAYSIA
   Wx::LANGUAGE_MALTESE
   Wx::LANGUAGE_MANIPURI
   Wx::LANGUAGE_MAORI
   Wx::LANGUAGE_MARATHI
   Wx::LANGUAGE_MOLDAVIAN
   Wx::LANGUAGE_MONGOLIAN
   Wx::LANGUAGE_NAURU
   Wx::LANGUAGE_NEPALI
   Wx::LANGUAGE_NEPALI_INDIA
   Wx::LANGUAGE_NORWEGIAN_BOKMAL
   Wx::LANGUAGE_NORWEGIAN_NYNORSK
   Wx::LANGUAGE_OCCITAN
   Wx::LANGUAGE_ORIYA
   Wx::LANGUAGE_OROMO
   Wx::LANGUAGE_PASHTO
   Wx::LANGUAGE_POLISH
   Wx::LANGUAGE_PORTUGUESE
   Wx::LANGUAGE_PORTUGUESE_BRAZILIAN
   Wx::LANGUAGE_PUNJABI
   Wx::LANGUAGE_QUECHUA
   Wx::LANGUAGE_RHAETO_ROMANCE
   Wx::LANGUAGE_ROMANIAN
   Wx::LANGUAGE_RUSSIAN
   Wx::LANGUAGE_RUSSIAN_UKRAINE
   Wx::LANGUAGE_SAMOAN
   Wx::LANGUAGE_SANGHO
   Wx::LANGUAGE_SANSKRIT
   Wx::LANGUAGE_SCOTS_GAELIC
   Wx::LANGUAGE_SERBIAN
   Wx::LANGUAGE_SERBIAN_CYRILLIC
   Wx::LANGUAGE_SERBIAN_LATIN
   Wx::LANGUAGE_SERBO_CROATIAN
   Wx::LANGUAGE_SESOTHO
   Wx::LANGUAGE_SETSWANA
   Wx::LANGUAGE_SHONA
   Wx::LANGUAGE_SINDHI
   Wx::LANGUAGE_SINHALESE
   Wx::LANGUAGE_SISWATI
   Wx::LANGUAGE_SLOVAK
   Wx::LANGUAGE_SLOVENIAN
   Wx::LANGUAGE_SOMALI
   Wx::LANGUAGE_SPANISH
   Wx::LANGUAGE_SPANISH_ARGENTINA
   Wx::LANGUAGE_SPANISH_BOLIVIA
   Wx::LANGUAGE_SPANISH_CHILE
   Wx::LANGUAGE_SPANISH_COLOMBIA
   Wx::LANGUAGE_SPANISH_COSTA_RICA
   Wx::LANGUAGE_SPANISH_DOMINICAN_REPUBLIC
   Wx::LANGUAGE_SPANISH_ECUADOR
   Wx::LANGUAGE_SPANISH_EL_SALVADOR
   Wx::LANGUAGE_SPANISH_GUATEMALA
   Wx::LANGUAGE_SPANISH_HONDURAS
   Wx::LANGUAGE_SPANISH_MEXICAN
   Wx::LANGUAGE_SPANISH_MODERN
   Wx::LANGUAGE_SPANISH_NICARAGUA
   Wx::LANGUAGE_SPANISH_PANAMA
   Wx::LANGUAGE_SPANISH_PARAGUAY
   Wx::LANGUAGE_SPANISH_PERU
   Wx::LANGUAGE_SPANISH_PUERTO_RICO
   Wx::LANGUAGE_SPANISH_URUGUAY
   Wx::LANGUAGE_SPANISH_US
   Wx::LANGUAGE_SPANISH_VENEZUELA
   Wx::LANGUAGE_SUNDANESE
   Wx::LANGUAGE_SWAHILI
   Wx::LANGUAGE_SWEDISH
   Wx::LANGUAGE_SWEDISH_FINLAND
   Wx::LANGUAGE_TAGALOG
   Wx::LANGUAGE_TAJIK
   Wx::LANGUAGE_TAMIL
   Wx::LANGUAGE_TATAR
   Wx::LANGUAGE_TELUGU
   Wx::LANGUAGE_THAI
   Wx::LANGUAGE_TIBETAN
   Wx::LANGUAGE_TIGRINYA
   Wx::LANGUAGE_TONGA
   Wx::LANGUAGE_TSONGA
   Wx::LANGUAGE_TURKISH
   Wx::LANGUAGE_TURKMEN
   Wx::LANGUAGE_TWI
   Wx::LANGUAGE_UIGHUR
   Wx::LANGUAGE_UKRAINIAN
   Wx::LANGUAGE_URDU
   Wx::LANGUAGE_URDU_INDIA
   Wx::LANGUAGE_URDU_PAKISTAN
   Wx::LANGUAGE_UZBEK
   Wx::LANGUAGE_UZBEK_CYRILLIC
   Wx::LANGUAGE_UZBEK_LATIN
   Wx::LANGUAGE_VIETNAMESE
   Wx::LANGUAGE_VOLAPUK
   Wx::LANGUAGE_WELSH
   Wx::LANGUAGE_WOLOF
   Wx::LANGUAGE_XHOSA
   Wx::LANGUAGE_YIDDISH
   Wx::LANGUAGE_YORUBA
   Wx::LANGUAGE_ZHUANG
   Wx::LANGUAGE_ZULU

[This page automatically generated from the Textile source at 2023-06-09 00:45:35 +0000]