[Gambas-user] [Gambas Bug Tracker] Bug #704: Format does not handle time separator correctly

Benoît Minisini gambas at ...1...
Fri Aug 28 19:04:15 CEST 2015


Le 28/08/2015 18:52, Tobias Boege a écrit :
> On Fri, 28 Aug 2015, Jussi Lahtinen wrote:
>> The point was, how do I test whether Format function works in some other
>> language than what I'm currently using?
>> Month names are not any bigger problem than the separators. How do I know
>> which is the correct separator?
>>
>
> (Sorry, I haven't really paid attention to the whole thread here and I'm no
> locale expert, so what I say may miss the point.)
>
> AFAICS you can use the C library's setlocale(3) function to set the locale
> of the Gambas process. If that doesn't work (haven't tested in a long time
> and remember I had some problems last time I tried that), you can at least
> set the LC_ALL environment variable prior to starting the Gambas project.
>
> As soon as the locale is set, you can use localeconv(3) to get a struct
> lconv which, according to locale(7), contains a field `decimal_point' where
> you find the decimal separator among lots of other information.
>
> Regards,
> Tobi
>

There is no concept of date/time separator in glibc locales.

Moreover, if you write a date/time following a glibc language locale 
ABC, you will be often surprised by people speaking the ABC language 
tellign you that they do not write date/time that way.

First example: French.
Second recent example: Norwegian.

Maybe this is the reason why KDE does not use glibc locales, but its own 
system.

As for Gambas, I don't think you can automate date/format testing.

You have to:

- Install every language support package possible!

- Find one person for each language that will check if the date/time 
printed by Gambas has a sense for it.

So it will be as until now: I will wait for bug reports...

Regards,

-- 
Benoît Minisini




More information about the User mailing list