---
title: "swiftLanguageMode(_:_:)"
framework: swift-package-manager
role: symbol
role_heading: Type Method
path: "swift-package-manager/documentation/packagedescription/swiftsetting/swiftlanguagemode(_:_:)"
---

# swiftLanguageMode(_:_:)

Defines a -language-mode to pass  to the corresponding build tool.

## Declaration

```swift
static func swiftLanguageMode(_ mode: SwiftLanguageMode, _ condition: BuildSettingCondition? = nil) -> SwiftSetting
```

## Parameters

- `mode`: The Swift language mode to use.
- `condition`: A condition that restricts the application of the build setting.

## Discussion

Discussion note: First available in PackageDescription 6.0.
