mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 09:02:01 +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
0c0cc7aedc
commit
afc8ff1c47
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>
|
2016-03-09 Riccardo Mottola <rm@gnu.org>
|
||||||
|
|
||||||
* Headers/Foundation/NSPathUtilities.h
|
* Headers/Foundation/NSPathUtilities.h
|
||||||
|
|
|
@ -186,6 +186,12 @@ GS_EXPORT NSString * const NSISO8601Calendar;
|
||||||
+ (NSString *) localeIdentifierFromWindowsLocaleCode: (uint32_t)lcid;
|
+ (NSString *) localeIdentifierFromWindowsLocaleCode: (uint32_t)lcid;
|
||||||
#endif
|
#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)
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
|
||||||
/** Returns an array of preferred languages. Sorted from most preferred to
|
/** Returns an array of preferred languages. Sorted from most preferred to
|
||||||
* leave preferred.
|
* leave preferred.
|
||||||
|
|
|
@ -588,6 +588,11 @@ static NSRecursiveLock *classLock = nil;
|
||||||
return AUTORELEASE(result);
|
return AUTORELEASE(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
+ (id) localeWithLocaleIdentifier:(NSString *)string
|
||||||
|
{
|
||||||
|
return AUTORELEASE([[NSLocale alloc] initWithLocaleIdentifier: string]);
|
||||||
|
}
|
||||||
|
|
||||||
+ (NSString *) localeIdentifierFromComponents: (NSDictionary *) dict
|
+ (NSString *) localeIdentifierFromComponents: (NSDictionary *) dict
|
||||||
{
|
{
|
||||||
NSString *result;
|
NSString *result;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue