Localization logic moved from ZRColaApp to wxAppEx.
This commit is contained in:
parent
ecef7013af
commit
7275cc9ecf
@ -29,13 +29,8 @@ wxIMPLEMENT_APP(ZRColaApp);
|
|||||||
|
|
||||||
bool ZRColaApp::OnInit()
|
bool ZRColaApp::OnInit()
|
||||||
{
|
{
|
||||||
if (wxLocale::IsAvailable(wxLANGUAGE_SLOVENIAN)) {
|
if (!wxAppEx::OnInit())
|
||||||
wxString sPath(wxPathOnly(argv[0]));
|
return false;
|
||||||
sPath << wxT("\\..\\locale");
|
|
||||||
m_locale.AddCatalogLookupPathPrefix(sPath);
|
|
||||||
wxVERIFY(m_locale.Init(wxLANGUAGE_SLOVENIAN));
|
|
||||||
wxVERIFY(m_locale.AddCatalog(wxT("ZRCola")));
|
|
||||||
}
|
|
||||||
|
|
||||||
ZRColaFrame *frame = new ZRColaFrame(_("Hello World"), wxPoint(50, 50), wxSize(450, 340));
|
ZRColaFrame *frame = new ZRColaFrame(_("Hello World"), wxPoint(50, 50), wxSize(450, 340));
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
|
@ -19,17 +19,14 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <wx/app.h>
|
#include <wxex/appex.h>
|
||||||
|
|
||||||
|
|
||||||
///
|
///
|
||||||
/// ZRCola application
|
/// ZRCola application
|
||||||
///
|
///
|
||||||
class ZRColaApp: public wxApp
|
class ZRColaApp : public wxAppEx
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual bool OnInit();
|
virtual bool OnInit();
|
||||||
|
|
||||||
protected:
|
|
||||||
wxLocale m_locale;
|
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user