---
title: "init(rawValue:)"
framework: swift-package-manager
role: symbol
role_heading: Initializer
path: "swift-package-manager/documentation/packagedescription/languagetag/init(rawvalue:)"
---

# init(rawValue:)

Creates a new instance with the specified raw value.

## Declaration

```swift
init?(rawValue: String)
```

## Parameters

- `rawValue`: The raw value to use for the new instance.

## Discussion

Discussion If there is no value of the type that corresponds with the specified raw value, this initializer returns nil.

## See Also

### Creating a Language Tag

- [init(extendedGraphemeClusterLiteral:)](swift-package-manager/documentation/packagedescription/languagetag/init(extendedgraphemeclusterliteral:).md)
- [init(stringLiteral:)](swift-package-manager/documentation/packagedescription/languagetag/init(stringliteral:).md)
- [init(unicodeScalarLiteral:)](swift-package-manager/documentation/packagedescription/languagetag/init(unicodescalarliteral:).md)
- [rawValue](swift-package-manager/documentation/packagedescription/languagetag/rawvalue.md)
