---
title: "subscript(dynamicMember:)"
framework: foundation
role: symbol
role_heading: Instance Subscript
path: "foundation/attributedynamiclookup/subscript(dynamicmember:)-4n6dp"
---

# subscript(dynamicMember:)

Provides dynamic member lookup for translation attributes.

## Declaration

```swift
subscript<T>(dynamicMember keyPath: KeyPath<AttributeScopes.TranslationAttributes, T>) -> T where T : AttributedStringKey { get }
```

## Parameters

- `keyPath`: A key path to a property in the TranslationAttributes scope.

## Return Value

Return Value The attribute key type that can be used to get or set attribute values.

## Overview

Overview This subscript enables the convenient dot-syntax access to translation attributes on AttributedString: var text = AttributedString("Product Name") text.skipsTranslation = true
