---
title: "CFLocaleGetValue(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cflocalegetvalue(_:_:)"
---

# CFLocaleGetValue(_:_:)

Returns the corresponding value for the given key of a locale’s key-value pair.

## Declaration

```swift
func CFLocaleGetValue(_ locale: CFLocale!, _ key: CFLocaleKey!) -> CFTypeRef!
```

## Parameters

- `locale`: The locale object to examine.
- `key`: The key for which to obtain the corresponding value. Possible values are described in doc://com.apple.corefoundation/documentation/CoreFoundation/locale-property-keys.

## Return Value

Return Value The value corresponding to the given key in locale. The value may be any type of CFType object. Ownership follows the The Get Rule.

## Discussion

Discussion Locale objects use key-value pairs to store property values. Use this function to get the value of a specific property.

## See Also

### Getting Information About a Locale

- [CFLocaleCopyDisplayNameForPropertyValue(_:_:_:)](corefoundation/cflocalecopydisplaynameforpropertyvalue(_:_:_:).md)
- [CFLocaleGetIdentifier(_:)](corefoundation/cflocalegetidentifier(_:).md)
