localizedString(forLocaleIdentifier:)
Returns the localized string for the specified locale identifier.
Declaration
func localizedString(forLocaleIdentifier localeIdentifier: String) -> StringParameters
- localeIdentifier:
The identifier for which you want the localized name.
Return Value
The localized name of the locale.
Discussion
For example, calling this method on an American English (en_US) locale, passing "fr_FR" for localeIdentifier, produces the string "French (France)".
This method is equivalent to calling the displayName(forKey:value:) method passing the identifier key and localeIdentifier value.
See Also
Related Documentation
Getting Display Information About a Locale
localizedString(forCountryCode:)localizedString(forLanguageCode:)localizedString(forScriptCode:)localizedString(forVariantCode:)localizedString(forCollationIdentifier:)localizedString(forCollatorIdentifier:)localizedString(forCurrencyCode:)localizedString(forCalendarIdentifier:)Locale Calendar Identifiers