Search found 45 matches

by Nucleorion
Fri May 05, 2017 9:37 am
Forum: C++ Development
Topic: Multilingual application
Replies: 42
Views: 4808

Re: Multilingual application

Ok. Work fine now.

I had #include <wx/config.h> in ExampleMain.h

Believe that the main.h. are picked the Main.cpp by putting the line #include "ExampleMain.h"
by Nucleorion
Fri May 05, 2017 8:59 am
Forum: C++ Development
Topic: Multilingual application
Replies: 42
Views: 4808

Re: Multilingual application

Code: Select all

wxConfigBase *config = wxConfigBase::Get();
This line is right? I get errors:

'wxConfigBase' was not declared in this scope
'config' was not declared in this scope
'wxConfigBase' is not a class, namespace, or enumeration
by Nucleorion
Fri May 05, 2017 7:47 am
Forum: C++ Development
Topic: Multilingual application
Replies: 42
Views: 4808

Re: Multilingual application

Hi, You main frame does not know about this. Just because it's public in the wxApp class doesn't mean it is accessible everywhere. Create a function in wxApp-derived class that return this pointer and call it in the main frame class. Thank you. How I create a function in wxApp-derived class. Sorry,...
by Nucleorion
Fri May 05, 2017 7:42 am
Forum: C++ Development
Topic: Multilingual application
Replies: 42
Views: 4808

Re: Multilingual application

I understand this: ExampleApp.h class MultilingualExampleApp : public wxApp { public: virtual bool OnInit(); wxLocale m_locale; wxFileConfig *ConfigINI; }; ExampleApp.cpp bool MultilingualExampleApp::OnInit() { ConfigINI = new wxFileConfig(wxEmptyString, wxEmptyString, wxPathOnly(wxStandardPaths::Ge...
by Nucleorion
Thu May 04, 2017 5:25 pm
Forum: C++ Development
Topic: Multilingual application
Replies: 42
Views: 4808

Re: Multilingual application

ExampleApp.h class MultilingualExampleApp : public wxApp { public: virtual bool OnInit(); wxLocale m_locale; wxFileConfig *ConfigINI = new wxFileConfig(wxEmptyString, wxEmptyString, wxPathOnly(wxStandardPaths::Get().GetDataDir()) + _T("\\config.ini")); }; ExampleApp.cpp bool MultilingualExampleApp::...
by Nucleorion
Thu May 04, 2017 9:27 am
Forum: C++ Development
Topic: Multilingual application
Replies: 42
Views: 4808

Re: Multilingual application

I've already tried that, but then it will not let me use it in main.cpp

I tried to put it in duplicate ie declare it and load it both in the app and in the mail. And works. But I do not think that's the right way to do it.
by Nucleorion
Wed May 03, 2017 8:27 am
Forum: C++ Development
Topic: Multilingual application
Replies: 42
Views: 4808

Re: Multilingual application

Whell. And now, how is the best way to I save the lang selected?

I try whit config.ini but this is loaded after app.cpp
by Nucleorion
Fri Apr 28, 2017 4:01 pm
Forum: C++ Development
Topic: Multilingual application
Replies: 42
Views: 4808

Re: Multilingual application

Ok. Thanks Mate :)
by Nucleorion
Fri Apr 28, 2017 9:44 am
Forum: C++ Development
Topic: Multilingual application
Replies: 42
Views: 4808

Re: Multilingual application

For change language into to program I have a menu to set language. void MultilingualExampleFrame::OnMenu_Language_Spanish_Selected(wxCommandEvent& event) { wxLocale* locale; long language=wxLANGUAGE_SPANISH; locale = new wxLocale( language ); locale->AddCatalogLookupPathPrefix(wxT(".\\langs\\es_ES")...
by Nucleorion
Fri Apr 28, 2017 9:34 am
Forum: C++ Development
Topic: Multilingual application
Replies: 42
Views: 4808

Re: Multilingual application

Whell, first error: m_locale.Init(wxLANGUAGE_SPANISH);//Init to the spanish wxLocale::AddCatalogLookupPathPrefix(wxT(".\\langs"));//add path m_locale.AddCatalog( wxT ("es"));//add catalog wxWidgetspath/locale/es.mo m_locale.AddCatalog(wxT("es_ES"));//add my .mo edit files Move this lines before //(*...
by Nucleorion
Fri Apr 28, 2017 8:23 am
Forum: C++ Development
Topic: Multilingual application
Replies: 42
Views: 4808

Re: Multilingual application

If you don't succeed with a relative path, go back to a known point and use an absolute harcoded one in your code for the moment. When all will be OK, you'll just have to fix this single point (since hardcoded absolute path is obviously not a good idea for your final release). And to check if a fil...
by Nucleorion
Mon Apr 24, 2017 8:53 am
Forum: C++ Development
Topic: Multilingual application
Replies: 42
Views: 4808

Re: Multilingual application

http://www.aplinet.org/aplidat/simages/Nucleorion/Screenshot-00535-21_04_2017-14_04_08.png I keep trying I have made sure that the files are on the path but it still does not work It would be ideal to find a turorial updated and explained in detail. I really do not understand how with the work that...
by Nucleorion
Fri Mar 17, 2017 9:50 am
Forum: C++ Development
Topic: Multilingual application
Replies: 42
Views: 4808

Re: Multilingual application

Procmon = Process monitor?

I get this:
Image
by Nucleorion
Thu Mar 16, 2017 6:36 pm
Forum: C++ Development
Topic: Multilingual application
Replies: 42
Views: 4808

Re: Multilingual application

I also try:

Code: Select all

	m_locale.Init(wxLANGUAGE_ENGLISH, wxLOCALE_CONV_ENCODING); //wxLOCALE_CONV_ENCODING Deprecated
	wxLocale::AddCatalogLookupPathPrefix(wxT(".\\langs"));
	m_locale.AddCatalog(wxT("es_ES"));
But it does not work either
by Nucleorion
Thu Mar 16, 2017 12:34 pm
Forum: C++ Development
Topic: Multilingual application
Replies: 42
Views: 4808

Re: Multilingual application

I like store translate files in folder .//langs Then I have langs folder with mo and po files cuatriplicated for prevent wrong ubication MyAppPath\es_ES.mo MyAppPath\langs\es_ES.mo MyAppPath\bin\langs\es_ES.mo MyAppPath\bin\Debug\langs\es_ES.mo I try follow the video https://wxwidgets.info/localizat...