discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SystemPreferences app and NSLocale


From: Edwin Ancaer
Subject: Re: SystemPreferences app and NSLocale
Date: Sun, 20 Aug 2017 06:52:14 +0200

Stefan,

looking more into the locale stuff, I found a mention of the file zones, in /usr/local/lib/GNUstep/Libraries/gnustep-base/Versions/1.24/Resources/NSTimeZones.

In it, I see the following list:

0 Europe/Paris
1 Europe/Busingen
1 Europe/Athens
0 Europe/Brussels
2 Europe/Zaporozhye
2 Europe/Moscow
1 Europe/Mariehamn
1 Europe/Prague
0 Europe/Guernsey
23 Europe/Lisbon
2 Europe/Volgograd
0 Europe/Luxembourg
1 Europe/Stockholm
1 Europe/Zagreb
0 Europe/Belfast
1 Europe/Belgrade
0 Europe/Isle_of_Man
1 Europe/Berlin
1 Europe/Helsinki
1 Europe/Podgorica
0 GMT0
 
Does the zero in the first position mean that Europe/Brussels has the same timezone as GMT0?
It would explain the results I get after setting the date/time in UserPreferences.

Also,  does GNUstep take the summer time into account?
I thought brussels was GMT+1, with an extra hour added in summer. This does not seem to be happening.

By the way, I looked in2 documents, the GNUstep Configuration Guide at http://gnustep.made-it.com/Configuration/  and there it is said the zones files can be found at  GNUSTEP_SYSTEM_ROOT/Library/Libraries/Resources/gnustep-base/NSTimeZones/,

This was wrong (for my installation at least. The correct directory was mentioned in http://www.gnustep.org/resources/documentation/User/GNUstep/gnustep-howto_4.html#Additional-Installation.


Kind regards


I suppose the first one not up to date anymore?

Kind regards


2017-08-19 15:12 GMT+02:00 Stefan Bidigaray <address@hidden>:
Hi Edwin,
I forgot to reply to all in my first email, so I'm adding the list again. I know at least Ricardo has some experience with this. I'm in the Eastern US, so the defaults always work out of the box, for me.

The problem with Apple docs is that they have some defaults that we do not. Additionally, I'm not entirely sure we've moved on from the old locale names like English, AmericanEnglish, etc. The new locales are in the format en, en_US, etc. I remember this was of not back when I worked on NSLocale.

I haven't been involved in this part of the code for some time, so I'm not sure.

One thing you should do, for sure, is set the LANG variable during start up. That variable controls the locale pretty much every piece is software, including GNUstep.

Regards

On Aug 19, 2017 02:57, "Edwin Ancaer" <address@hidden> wrote:
Stefan,

Sorry, but I do not see anything language related in the Defaults option.
Also, tough I defined date and time to be Europe/Brussels, NSDate gives me UTC date and time.

I wil start by looking deeper into the way NSLocale works. It seems more complex than I thought.
It is ok to use the apple documentation for this?

For the appliction, it might be easiest to let the user decide on his preferred language in a menu option.

After all, if I was using a computer beloning to a russian guy, I would still want my application to be in english, and not depending on the defined Systempreferences.

Again, thanks for looking into this.

Edwin

Op 13 aug. 2017 14:24 schreef "Stefan Bidigaray" <address@hidden>:
There's a default, which I can't remember what it is called now (and I can't look it up because I'm out of town) used to set this. Off the top of my head, I think it's "Language". You might be able to find it in SystemPreferences, under the defaults window.

On Aug 12, 2017 16:22, "Edwin Ancaer" <address@hidden> wrote:
Stefan,

 So my supposition was wrong. Thanks for answering

Does that mean that every applicatin has to provide managing the settings for NSLocale itself?
.

Kind regards

Op 12 aug. 2017 16:51 schreef "Stefan Bidigaray" <address@hidden>:
The SystemPreferences setting controls the timezone, not the locale. As far as I remember, SystemPreferences does not have a way to set the locale. I don't think there is a way to do that, at the moment.

On Aug 12, 2017 01:55, "Edwin Ancaer" <address@hidden> wrote:
Hello guys,

I supposed that setting the Location in the Date and Time option of the SystemPreferences application would influence the settings for the NSLocale message. I set the location to Europe/Brussels, but when I execute this:  

    NSLocale *current_locale = [NSLocale currentLocale];
  NSLog(@"The current locale is %@", current_locale);
 
  NSLocale *au_current_locale = [NSLocale autoupdatingCurrentLocale];
  NSLog(@"The autoupdating current locale is %@", au_current_locale);
 
  NSLocale *system_Locale = [NSLocale systemLocale];
  NSLog(@"The system locale is %@", system_Locale);


The result I  get is:

2017-08-12 05:47:51.500 TM1[1432:100188] The current locale is en_US_POSIX
2017-08-12 05:47:51.505 TM1[1432:100188] The autoupdating current locale is en_US_POSIX
2017-08-12 05:47:51.515 TM1[1432:100188] The system locale is en_US_POSIX

What am I missing here?

I'm using FreeBSD 11.0, and build GNUstep  and the GNUstep applications from the ports system.


Kind regards,


Edwin Ancaer

_______________________________________________
Discuss-gnustep mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnustep



reply via email to

[Prev in Thread] Current Thread [Next in Thread]