Implement -[NSLocale languageCode]

This commit is contained in:
Sergey Bugaev 2018-08-14 11:06:42 +03:00
parent bd4131c249
commit 8c91225112
2 changed files with 5 additions and 0 deletions

View File

@ -53,6 +53,7 @@ FOUNDATION_EXPORT NSString * const NSISO8601Calendar;
@interface NSLocale (NSExtendedLocale)
- (NSString *)localeIdentifier;
- (NSString *)languageCode;
@end

View File

@ -36,6 +36,10 @@ CF_PRIVATE
return [[[NSAutoLocale alloc] _init] autorelease];
}
- (NSString *) languageCode {
return [self objectForKey: NSLocaleLanguageCode];
}
@end