[Gambas-user] More Date woes

Richard richard.j.walker at ...247...
Fri Mar 14 21:29:20 CET 2008


On Friday 14 March 2008 20:18:01 Benoit Minisini wrote:
> On vendredi 14 mars 2008, Richard wrote:
> > Jeffrey, thanks for the reminder on Format/Format$. I don't think I have
> > used it anywhere in the current version of my program. I may have to go
> > back to it, or be more careful in how I derive the Date values I display
> > in ValueBox widgets.
> >
> >
> > Benoit, perhaps I can do something useful if I study the ValueBox
> > component. I learned a little bit from debugging an early version of
> > DateBox and TimeBox and I have dared to tweak the DateChooser control to
> > vary the format of the month name in the combo box depending on the width
> > of the control.
> >
> > The tweak works well in English where full month names have well defined
> > 3 letter short forms, and I use digits where even 3 letters is too long.
>
> If you do something, it must work for any language and date format in the
> world! :-)

Sounds reasonable:-)
Do you think it would be ok to start with the languages directly supported by 
translations of Gambas?

Actually, I think it might be easier than I first thought. The modified 
DateChooser uses whatever language the user has set as default and simply 
measures the desktop font width of the results of applying "mmmm", "mmm" 
and "mm" as the date format for the month. Each of the twelve months is 
measured so there is no presumption of which month has the longest name.

I'll try setting a few "foreign" languages and see what happens with the 
current modification. I think I read somewhere in this list a few days ago 
where you explained how to start Gambas with a language other than the system 
default; I'll also check out your translation howto on the wiki for more 
hints. 

Can you think of anything else I should check?

Richard




More information about the User mailing list