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

# identifier(_:)

Returns the locale identifier, in the specified standard format.

## Declaration

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

## Parameters

- `type`: The standard locale identifier format to use for the returned string.

## Return Value

Return Value The locale identifier, formatted in accordance with the specified identifier type.

## See Also

### Getting information about a locale

- [identifier](foundation/locale/identifier.md)
- [Locale.IdentifierType](foundation/locale/identifiertype.md)
- [calendar](foundation/locale/calendar.md)
- [regionCode](foundation/locale/regioncode.md)
- [languageCode](foundation/locale/languagecode-swift.property.md)
- [scriptCode](foundation/locale/scriptcode.md)
- [variantCode](foundation/locale/variantcode.md)
- [exemplarCharacterSet](foundation/locale/exemplarcharacterset.md)
- [collationIdentifier](foundation/locale/collationidentifier.md)
- [collatorIdentifier](foundation/locale/collatoridentifier.md)
- [usesMetricSystem](foundation/locale/usesmetricsystem.md)
- [decimalSeparator](foundation/locale/decimalseparator.md)
- [groupingSeparator](foundation/locale/groupingseparator.md)
- [currencyCode](foundation/locale/currencycode.md)
- [currencySymbol](foundation/locale/currencysymbol.md)
