Instance Method

localizedStringForCountryCode:

Returns the localized string for the specified country code.

Declaration

- (NSString *)localizedStringForCountryCode:(NSString *)countryCode;

Parameters

countryCode

The country code indicating the country whose name you want.

Return Value

The localized name of the country for the given code.

Discussion

For example, calling this method on an American English (en_US) locale, passing "GB" for countryCode, produces the string "United Kingdom".

This method is equivalent to calling the displayNameForKey:value: method passing the NSLocaleCountryCode key and countryCode value.

See Also

Getting Display Information About a Locale

- localizedStringForLocaleIdentifier:

Returns the localized string for the specified locale identifier.

- localizedStringForLanguageCode:

Returns the localized string for the specified language code.

- localizedStringForScriptCode:

Returns the localized string for the specified script code.

- localizedStringForVariantCode:

Returns the localized string for the specified variant code.

- localizedStringForCollationIdentifier:

Returns the localized string for the specified collation identifier.

- localizedStringForCollatorIdentifier:

Returns the localized string for the specified collator identifier.

- localizedStringForCurrencyCode:

Returns the localized string for the specified currency code.

- localizedStringForCalendarIdentifier:

Returns the localized string for the specified calendar identifier.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software