discuss-gnustep
[Top][All Lists]
Advanced

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

Re: SystemPreferences app and NSLocale


From: Stefan Bidigaray
Subject: Re: SystemPreferences app and NSLocale
Date: Sat, 19 Aug 2017 09:12:27 -0400

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" <eancaer@gmail.com> 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" <stefanbidi@gmail.com>:
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" <eancaer@gmail.com> 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" <stefanbidi@gmail.com>:
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" <eancaer@gmail.com> 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
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep


reply via email to

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