localizedString(forScriptCode:)
Returns the localized string for the specified script code.
Declaration
func localizedString(forScriptCode scriptCode: String) -> String?Parameters
- scriptCode:
The script code for the script whose name you want.
Return Value
The localized name of the script.
Discussion
For example, calling this method on an American English (en_US) locale, passing "Hant" for scriptCode, produces the string "Traditional Han".
This method is equivalent to calling the displayName(forKey:value:) method passing the scriptCode key and scriptCode value.
See Also
Getting Display Information About a Locale
localizedString(forLocaleIdentifier:)localizedString(forCountryCode:)localizedString(forLanguageCode:)localizedString(forVariantCode:)localizedString(forCollationIdentifier:)localizedString(forCollatorIdentifier:)localizedString(forCurrencyCode:)localizedString(forCalendarIdentifier:)Locale Calendar Identifiers