Re: [Boa Constr] Alternate language(s)
Status: Beta
Brought to you by:
riaan
From: Blaine L. <bl...@te...> - 2001-11-29 15:27:42
|
Riaan hinted to me that some people may be working on multiple language support for Boa's IDE. I would hope my idea here may help in this task, as well as really helping me out! I would like to float an idea I had to implement selectable language support in Boa. Of course I will quickly duck and cover just in case I have stumbled into a mine field :). I would like to add a _init_text method, I imagine that in this method I would see: def _init_text(self): self.ExitText = ('Back to Main Screen', 'Spanish', 'French')[GlobalLang] def _init_ctrls(self, prnt): self._init_text() wxFrame.__init__(self, size = wxSize(640, 480), id = wxID_BOAFRAME, ***SNIP*** self.Exit = wxButton(label = self.ExitText, id = wxID_BOAFRAMEEXIT, parent = self, name = 'Exit', siz ***SNIP*** I would expect to next have to change the Inspector's text input methods. Currently they assume all input is text. Some sort of adjustment is necessary to implement this change. I don't know how most people would prefer it done. I can imagine a couple of ways: 1- Stop implying the "'s. The user can enter any variable or 'text' into the control and then would be responsible for creating his own _init_text method for any variables necessary. Easy to implement quickly, but very manual for the user. 2- A global preferences setting for the project. Either Boa behaves as it does now, or it forces every text field to have a global number of language entries. Probably easier, but coarse control. 3- A check box for each text field, that would allow simple text entry, or create the appropriate _init_text entry. This may be too much control for what is necessary. Also, I don't know how much overhead adding all of the text entries into the class's memory space. Perhaps it would be more efficient to embed the ('english','spanish')[GlobalLang] in the object's instantiation call. Example in case I wasn't clear: self.Exit = wxButton(label = ('english','spanish')[GlobalLang], id = wxID_BOAFRAMEEXIT... The great feature of the _init_text method is this: I only know 1 language, therefore with projects that require additional languages it would be nice to be able to create all of the screens, then have 1 concise area (per screen) for a linguist to go to and fill in the matrix of text entries. I'm sorry for not doing my own research on how to implement this functionality, but I have tried to follow Boa's code, and I just don't understand object oriented/wxPython code enough yet. Although, I will try some experiments if someone can at least point me to the correct methods. Thank you for reading this far. Blaine Lee Blaine Lee wrote: > I have been asked by my customer to provide the ability to switch all of the GUI to > Spanish and preferably the ability to swap back and forth. Currently I am using Boa > version 0.0.5... I know how to do this, but how do I do it easily? Is there > provision for this in the later versions? Are there plans? > > Thanks Riaan for a great tool > > Regards > Blaine Lee > > _______________________________________________ > Boa-constructor-users mailing list > Boa...@li... > https://lists.sourceforge.net/lists/listinfo/boa-constructor-users |