<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/Text/WritingDirectionStrategy/contentBased",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4TextV24WritingDirectionStrategyV12contentBasedAEvpZ"
  },
  "title" : "contentBased"
}
-->

# contentBased

The writing direction following the language of the string that
is laid out.

```
static let contentBased: Text.WritingDirectionStrategy
```

## Discussion

The system may use different sources to determine the language
of the string. This may include the characters used in the
string, especially BiDi isolation markers, the language of the
localization file the string was loaded from, or explicit
annotations with the
<doc://com.apple.documentation/documentation/Foundation/AttributeScopes/FoundationAttributes/languageIdentifier>
attribute.

---

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)