Ładny brzuch
Czesto nawet w zupenie amatorskich programch pojawiaj si opcje zmiany jezyka interfejsu. Ma ktos moze jakies informacje na temat wykonania czegos takiego? Chociaz ogolnie z czym to sie je ;)
jest takie cos:
http://www.borland.p...ia_delphi.shtml
jednak jakos mi to nie chce dzialac [ale nie spedzilem nad tym zbyt duzo czasu].
mysle ze reczna metoda zmiany nazw powinna wystarczyc, mozna zrobic cos w stylu:
#include <map> #include <string> using namespace std; //... __fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner) { map<string,string> translation; translation.insert( make_pair("Button1","exit") ); translation.insert( make_pair("Button2","help") ); translation.insert( make_pair("Label1","info") ); for ( int i = 0; i < Form1->ComponentCount; i++ ) { TComponent* obj = Form1->Components[i]; String txt = translation[obj->Name.c_str()].c_str(); if ( txt.IsEmpty() ) continue; if ( obj->ClassNameIs("TButton") ) dynamic_cast<TButton *>(obj)->Caption = txt; else if ( obj->ClassNameIs("TLabel") ) dynamic_cast<TLabel *>(obj)->Caption = txt; } }
Mona, te trzyma wszystkie teksty w jakich plikach, a dalej to ju wiadomo.
zanotowane.pl doc.pisz.pl pdf.pisz.pl zsf.htw.pl
jest takie cos:
http://www.borland.p...ia_delphi.shtml
jednak jakos mi to nie chce dzialac [ale nie spedzilem nad tym zbyt duzo czasu].
mysle ze reczna metoda zmiany nazw powinna wystarczyc, mozna zrobic cos w stylu:
#include <map> #include <string> using namespace std; //... __fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner) { map<string,string> translation; translation.insert( make_pair("Button1","exit") ); translation.insert( make_pair("Button2","help") ); translation.insert( make_pair("Label1","info") ); for ( int i = 0; i < Form1->ComponentCount; i++ ) { TComponent* obj = Form1->Components[i]; String txt = translation[obj->Name.c_str()].c_str(); if ( txt.IsEmpty() ) continue; if ( obj->ClassNameIs("TButton") ) dynamic_cast<TButton *>(obj)->Caption = txt; else if ( obj->ClassNameIs("TLabel") ) dynamic_cast<TLabel *>(obj)->Caption = txt; } }
Mona, te trzyma wszystkie teksty w jakich plikach, a dalej to ju wiadomo.