Re: [Kati-devel] XML Editor
Status: Pre-Alpha
Brought to you by:
nemcs
|
From: Csaba N. <cs...@gm...> - 2008-11-17 13:39:04
|
On Sun, Nov 16, 2008 at 8:56 PM, Francisco Javier Garrote Cruz <mul...@gm...> wrote: > I have a question. You said that you want me to KLanguage non-static. My Yeaah! Now I am happy! ;) > idea was to be able to call KLanguage without creating an object each > time. Thats why I made it static. I think it might be simpler just to > write KLanguage.Klanguage each time we want to call it. I think.... * We have to load&store the resource bundle once. (at start-up) * We also have to set the language once. (at start-up) * The query function should be simple like getTranslation(something). Solutions: In either case we have to create a member variable for the selected language, and the ResourceBundle. non-static) We use the constructor to set up member variables. static) We use an extra function to set up member variables. In the query function (getTransaltion) we have to handle the situation, if any of the member variables is not set. I think the non-static is a bit more straightforward. ;) Anyway, please consider the 3 starred items. I hope i answered your questions! -- cs |