Contents

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