};
// ----------------------------------------------------------------------------
-// wxWindows macros
+// wxWidgets macros
// ----------------------------------------------------------------------------
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
test_menu->AppendSeparator();
test_menu->Append(INTERNAT_TEST_1, _("&1 _() (gettext)"));
test_menu->Append(INTERNAT_TEST_2, _("&2 _N() (ngettext)"));
- test_menu->Append(INTERNAT_TEST_3, _("&3 N_() (gettext_noop)"));
+ test_menu->Append(INTERNAT_TEST_3, _("&3 wxTRANSLATE() (gettext_noop)"));
wxMenuBar *menu_bar = new wxMenuBar;
menu_bar->Append(file_menu, _("&File"));
MyFrame::MyFrame(wxLocale& locale)
: wxFrame(NULL,
-1,
- _("International wxWindows App"),
+ _("International wxWidgets App"),
wxPoint(50, 50),
wxSize(350, 60)),
m_locale(locale)
{
const wxChar* title = _("Testing _() (gettext)");
wxTextEntryDialog d(this, _("Please enter text to translate"),
- title, N_("default value"));
+ title, wxTRANSLATE("default value"));
if (d.ShowModal() == wxID_OK)
{
wxString v = d.GetValue();
{
const wxChar* title = _("Testing _N() (ngettext)");
wxTextEntryDialog d(this,
- _("Please enter range for plural forms of \"n files deleted\""
- "phrase"),
+ _("Please enter range for plural forms of \"n files deleted\" phrase"),
title, _T("0-10"));
if (d.ShowModal() == wxID_OK)
{
s << _T("\n");
for (int n = first; n <= last; ++n)
{
- s << n << _T(" ") << _N("file deleted", "files deleted", n)
- << _T("\n");
+ s << n << _T(" ") <<
+ wxGetTranslation(_T("file deleted"), _T("files deleted"), n) <<
+ _T("\n");
}
wxMessageBox(s);
}
{
const wxChar* lines[] =
{
- N_("line 1"),
- N_("line 2"),
- N_("line 3"),
+ wxTRANSLATE("line 1"),
+ wxTRANSLATE("line 2"),
+ wxTRANSLATE("line 3"),
};
- wxString s(_("Testing N_() (gettext_noop)"));
+ wxString s(_("Testing wxTRANSLATE() (gettext_noop)"));
s << _T("\n");
for (size_t i = 0; i < WXSIZEOF(lines); ++i)
{