---
title: languageCode
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nslocale/languagecode
---

# languageCode

The language code for the locale.

## Declaration

```swift
var languageCode: String { get }
```

## Discussion

Discussion Examples of language codes include "en", "es", and "zh". Use localizedString(forLanguageCode:) 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 languageCode key.

## See Also

### Related Documentation

- [isoLanguageCodes](foundation/nslocale/isolanguagecodes.md)

### Getting Information About a Locale

- [localeIdentifier](foundation/nslocale/localeidentifier.md)
- [countryCode](foundation/nslocale/countrycode.md)
- [scriptCode](foundation/nslocale/scriptcode.md)
- [variantCode](foundation/nslocale/variantcode.md)
- [exemplarCharacterSet](foundation/nslocale/exemplarcharacterset.md)
- [collationIdentifier](foundation/nslocale/collationidentifier.md)
- [collatorIdentifier](foundation/nslocale/collatoridentifier.md)
- [usesMetricSystem](foundation/nslocale/usesmetricsystem.md)
- [decimalSeparator](foundation/nslocale/decimalseparator.md)
- [groupingSeparator](foundation/nslocale/groupingseparator.md)
- [currencyCode](foundation/nslocale/currencycode.md)
- [currencySymbol](foundation/nslocale/currencysymbol.md)
- [calendarIdentifier](foundation/nslocale/calendaridentifier.md)
- [quotationBeginDelimiter](foundation/nslocale/quotationbegindelimiter.md)
- [quotationEndDelimiter](foundation/nslocale/quotationenddelimiter.md)
