+void MyFrame::OnTestLocaleAvail(wxCommandEvent& WXUNUSED(event))
+{
+ static wxString s_locale;
+ wxString locale = wxGetTextFromUser
+ (
+ _("Enter the locale to test"),
+ wxGetTextFromUserPromptStr,
+ s_locale,
+ this
+ );
+ if ( locale.empty() )
+ return;
+
+ s_locale = locale;
+ const wxLanguageInfo * const info = wxLocale::FindLanguageInfo(s_locale);
+ if ( !info )
+ {
+ wxLogError(_("Locale \"%s\" is unknown."), s_locale.c_str());
+ return;
+ }
+
+ if ( wxLocale::IsAvailable(info->Language) )
+ wxLogMessage(_("Locale \"%s\" is available."), s_locale.c_str());
+ else
+ wxLogWarning(_("Locale \"%s\" is not available."), s_locale.c_str());
+}
+
+void MyFrame::OnOpen(wxCommandEvent& WXUNUSED(event))