Up

NSLocale class documentation

Authors

Generated by Gregory John Casamento,,,

Date: Generated at 2023-12-20 19:35:39 -0500

Software documentation for the NSLocale class

NSLocale : NSObject

Declared in:
Foundation/NSLocale.h
Conforms to:
NSCoding
NSCopying
Availability: MacOS-X 10.4.0

Provides information describing language, date and time, and currency information.
Method summary

ISOCountryCodes 

+ (NSArray*) ISOCountryCodes;
Availability: MacOS-X 10.4.0

Returns an array of NSString representing all known country codes.

ISOCurrencyCodes 

+ (NSArray*) ISOCurrencyCodes;
Availability: MacOS-X 10.4.0

Returns an array of NSString representing all known currency codes.

ISOLanguageCodes 

+ (NSArray*) ISOLanguageCodes;
Availability: MacOS-X 10.4.0

Returns an array of NSString representing all known language codes.

autoupdatingCurrentLocale 

+ (id) autoupdatingCurrentLocale;
Availability: MacOS-X 10.5.0

Returns a version of the current locale which automatically updates when locale settngs are changed.

availableLocaleIdentifiers 

+ (NSArray*) availableLocaleIdentifiers;
Availability: MacOS-X 10.4.0

Returns an array of NSStrings with all the available locale identifiers.

canonicalLanguageIdentifierFromString: 

+ (NSString*) canonicalLanguageIdentifierFromString: (NSString*)string;
Availability: MacOS-X 10.4.0

Returns the caoninical identifier for a language represented by the supplied string.

canonicalLocaleIdentifierFromString: 

+ (NSString*) canonicalLocaleIdentifierFromString: (NSString*)string;
Availability: MacOS-X 10.4.0

Returns the canonical identifier for a locale represented by the supplied string.

characterDirectionForLanguage: 

+ (NSLocaleLanguageDirection) characterDirectionForLanguage: (NSString*)isoLangCode;
Availability: MacOS-X 10.4.0

Returns the direction in which the language is written.

commonISOCurrencyCodes 

+ (NSArray*) commonISOCurrencyCodes;
Availability: MacOS-X 10.5.0

Returns a list of available ISO currency code strings.

componentsFromLocaleIdentifier: 

+ (NSDictionary*) componentsFromLocaleIdentifier: (NSString*)string;
Availability: MacOS-X 10.4.0

Parses the supplied locale identifier and returns a dictionary containing its components.
Components are NSLocaleLanguageCode, NSLocaleCountryCode, NSLocaleCalendar.

currentLocale 

+ (instancetype) currentLocale;
Availability: MacOS-X 10.4.0

Returns the current locale information.

lineDirectionForLanguage: 

+ (NSLocaleLanguageDirection) lineDirectionForLanguage: (NSString*)isoLangCode;
Availability: MacOS-X 10.4.0

Returns the direction in which lines of text in the specified language are written.

localeIdentifierFromComponents: 

+ (NSString*) localeIdentifierFromComponents: (NSDictionary*)dict;
Availability: MacOS-X 10.4.0

Builds and returns a locale idntifier from the individual components supplied in dict.
Components are NSLocaleLanguageCode, NSLocaleCountryCode, NSLocaleCalendar.

localeIdentifierFromWindowsLocaleCode: 

+ (NSString*) localeIdentifierFromWindowsLocaleCode: (uint32_t)lcid;
Availability: MacOS-X 10.6.0

Returns the standard locale identifier for the windows locale code.

localeWithLocaleIdentifier: 

+ (instancetype) localeWithLocaleIdentifier: (NSString*)string;
Availability: MacOS-X 10.6.0

Returns a locale initialised with the given locale identifier.

preferredLanguages 

+ (NSArray*) preferredLanguages;
Availability: MacOS-X 10.5.0

Returns an array of preferred languages. Sorted from most preferred to leave preferred.

systemLocale 

+ (instancetype) systemLocale;
Availability: MacOS-X 10.4.0

Returns the the system locale.

windowsLocaleCodeFromLocaleIdentifier: 

+ (uint32_t) windowsLocaleCodeFromLocaleIdentifier: (NSString*)localeIdentifier;
Availability: MacOS-X 10.6.0

Returns the windows locale code corresponding to the staqndard locale identifier.

collationIdentifier 

- (NSString*) collationIdentifier;
Availability: MacOS-X 10.12.0

Description forthcoming.

collatorIdentifier 

- (NSString*) collatorIdentifier;
Availability: MacOS-X 10.12.0

Description forthcoming.

countryCode 

- (NSString*) countryCode;
Availability: MacOS-X 10.12.0

Description forthcoming.

displayNameForKey: value: 

- (NSString*) displayNameForKey: (NSString*)key value: (id)value;
Availability: MacOS-X 10.4.0

Returns the localised representation of the supplied value converted on the basis that it represents information whose type is specified by the key.

exemplarCharacterSet 

- (NSCharacterSet*) exemplarCharacterSet;
Availability: MacOS-X 10.12.0

Description forthcoming.

initWithLocaleIdentifier: 

- (instancetype) initWithLocaleIdentifier: (NSString*)string;
Availability: MacOS-X 10.4.0

Initialises the receiver to be the locale specified by the identifier. This may result in replacement of the receiver by an existing locale.

languageCode 

- (NSString*) languageCode;
Availability: MacOS-X 10.12.0

Description forthcoming.

localeIdentifier 

- (NSString*) localeIdentifier;
Availability: MacOS-X 10.4.0

Returns the canonical identifier for the receiver (which may differ from the identifgier used to create the receiver since different identifiers may map to the same locale).

objectForKey: 

- (id) objectForKey: (id)key;
Availability: MacOS-X 10.4.0

Returns the named object from the receiver locale.

scriptCode 

- (NSString*) scriptCode;
Availability: MacOS-X 10.12.0

Description forthcoming.

variantCode 

- (NSString*) variantCode;
Availability: MacOS-X 10.12.0

Description forthcoming.


Up