---
title: "identifier(_:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/locale/languagecode-swift.struct/identifier(_:)"
---

# identifier(_:)

Returns the ISO code of the given identifier type. Returns nil if the language isn’t a valid ISO language, or if the specified identifier type isn’t available to the language.

## Declaration

```swift
func identifier(_ type: Locale.LanguageCode.IdentifierType) -> String?
```
