<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/typesettingLanguage(_:isEnabled:)-4ldzm",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE19typesettingLanguage_9isEnabledQr10Foundation6LocaleV0E0V_SbtF"
  },
  "title" : "typesettingLanguage(_:isEnabled:)"
}
-->

# typesettingLanguage(_:isEnabled:)

Specifies the language for typesetting.

```
nonisolated func typesettingLanguage(_ language: Locale.Language, isEnabled: Bool = true) -> some View
```

## Parameters

`language`

The explicit language to use for typesetting.

`isEnabled`

A Boolean value that indicates whether text language is
added

## Return Value

A view with the typesetting language set to the value you
supply.

## Discussion

In some cases `Text` may contain text of a particular language which
doesn’t match the device UI language. In that case it’s useful to
specify a language so line height, line breaking and spacing will
respect the script used for that language. For example:

```
Text(verbatim: "แอปเปิล")
    .typesettingLanguage(.init(languageCode: .thai))
```

Note: this language does not affect text localization.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)