mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Add method +[NSLocale localeWithLocaleIdentifier:], which was
introduced in OS X 10.6. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39516 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5a7429eea6
commit
97433a8701
3 changed files with 17 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2016-03-10 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* Headers/Foundation/NSLocale.h:
|
||||
* Source/NSLocale.m (+localeWithLocaleIdentifier:):
|
||||
Add trivial method introduced in OS X 10.6.
|
||||
|
||||
2016-03-09 Riccardo Mottola <rm@gnu.org>
|
||||
|
||||
* Headers/Foundation/NSPathUtilities.h
|
||||
|
|
|
@ -186,6 +186,12 @@ GS_EXPORT NSString * const NSISO8601Calendar;
|
|||
+ (NSString *) localeIdentifierFromWindowsLocaleCode: (uint32_t)lcid;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
/** Returns a locale initialised with the given locale identifier.
|
||||
*/
|
||||
+ (id) localeWithLocaleIdentifier:(NSString *)string;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
|
||||
/** Returns an array of preferred languages. Sorted from most preferred to
|
||||
* leave preferred.
|
||||
|
|
|
@ -588,6 +588,11 @@ static NSRecursiveLock *classLock = nil;
|
|||
return AUTORELEASE(result);
|
||||
}
|
||||
|
||||
+ (id) localeWithLocaleIdentifier:(NSString *)string
|
||||
{
|
||||
return AUTORELEASE([[NSLocale alloc] initWithLocaleIdentifier: string]);
|
||||
}
|
||||
|
||||
+ (NSString *) localeIdentifierFromComponents: (NSDictionary *) dict
|
||||
{
|
||||
NSString *result;
|
||||
|
|
Loading…
Reference in a new issue