Contents

localeIdentifier

The identifier for the locale.

Declaration

var localeIdentifier: String { get }

Discussion

Examples of locale identifiers include "en_GB", "es_ES_PREEURO", and "zh-Hant_HK_POSIX@collation=pinyin;currency=CNY".

Use localizedString(forIdentifier:) to obtain a version of the value suitable for display to the user.

This property contains the same value returned by the object(forKey:) method when passing the identifier key.

See Also

Related Documentation

Getting Information About a Locale