discuss-gnustep
[Top][All Lists]
Advanced

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

Re: convenience method for creating locales?


From: Adam Fedor
Subject: Re: convenience method for creating locales?
Date: Tue, 19 Apr 2005 10:27:47 -0600


On Apr 19, 2005, at 7:26 AM, David Wetzel wrote:

Hi folks,

NSCalendarDate has descriptionWithCalendarFormat:locale: which needs a locale.

Imagine I have a web application that needs a German (DE) locale for some sessions, for some a DE-AT (January is 'Jänner' in Austrian not 'Januar' like German) and for some EN to name a few.
It does not matter what the locale of the current user process is.

Is there something like

// name is 'DE' or 'FR' or 'DE-AT'...
+ (NSDictionary*) localeWithName:(NSSting*) shortName

This should contain all data to create a localized NSCalendarDate.


There really isn't something like this, but it might be nice to pull out that functionality from NSUserDefaults (+standardUserDefaults). The only problem is, that for locales that aren't in the customized set that is delivered with gnustep-base, you would have to temporarily set the new locale, read the information from the i18n functions, then set the locale back.





reply via email to

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