Internationalization, converting Command Line Parser

Erdem U. Altinyurt eua at dsl.ttnet.net.tr
Thu Jan 25 12:34:31 PST 2007


Solution found...

Problem raising about "global static wxCmdLineEntryDesc"
Since it's global, it's executing (or defining) before conversion which
is in OnInit().


Erdem U. Altinyurt wrote:
> Sorry my English :)
> Canadian embassy don't give me a visa for english course month ago.. :/
>
> I am suspecting that:
>
> if(argc!=1) //If there is an argument
>     if (!wxApp::OnInit())
>         return false;
>
> Because wxApp::OnInit() is main class and I am setting wxLocale only fot
> inherited class. "CMD parser" called by main class but there is no
> Locale information returning to main class. Than main class think itself
> english locale and dont execute wxLocale information. But I don`t sure
> about it.
>
> I will try recompile wx2.8 with debug and research how can I use WXTRACE
> with "i18n"
>
> Thank you for help and your time.
>
> EUA.
>
> Vadim Zeitlin wrote:
>   
>> On Thu, 25 Jan 2007 16:49:03 +0200 "Erdem U. Altinyurt" <eua at dsl.ttnet.net.tr> wrote:
>>
>> EUA> My strings are converted to my language.
>> EUA> GUI mode works with my locale strings but CLI.
>> [it seems something regularly eats the ends of your sentences]
>>
>> EUA> bool DivFixppApp::OnInit(){
>> EUA>     if ( !my_locale.Init(wxLANGUAGE_TURKISH, wxLOCALE_CONV_ENCODING) )
>> EUA>         {
>> EUA>             wxLogError(_T("This language is not supported by the system."));
>> EUA>             return false;
>> EUA>         }
>> EUA>     wxLocale::AddCatalogLookupPathPrefix(_("."));
>> EUA>     my_locale.AddCatalog(wxT("internat"));
>> EUA> 
>> EUA>     if(argc!=1)        //If there is an argument
>> EUA>         if (!wxApp::OnInit())
>> EUA>             return false;
>> EUA>     SetVendorName(_T("Death Knight"));
>> EUA>     SetAppName(_T("DivFix++"));
>> EUA>     DivFixpp* frame = new DivFixpp( my_locale );
>> EUA>     SetTopWindow(frame);
>> EUA>     frame->Show(true);
>> EUA>     return true;
>> EUA>     }
>>
>>  I don't see anything wrong here. You may want to set environment variable
>> WXTRACE to "i18n" to see some trace messages (assuming you're using debug
>> build) which may give you some useful information.
>>
>>  Regards,
>> VZ
>>
>>   
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wx-users-help at lists.wxwidgets.org
>
>
>   




More information about the wx-users mailing list