---
title: locale
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/localizedstringresource/locale
---

# locale

The locale to use to look up the localized string from the string resource.

## Declaration

```swift
var locale: Locale
```

## Discussion

Discussion To perform localization in a different locale, change this value before passing it to a String or AttributedString initializer that takes a LocalizedStringResource.

## See Also

### Accessing resource properties

- [key](foundation/localizedstringresource/key.md)
- [defaultValue](foundation/localizedstringresource/defaultvalue.md)
- [table](foundation/localizedstringresource/table.md)
- [bundle](foundation/localizedstringresource/bundle.md)
- [LocalizedStringResource.BundleDescription](foundation/localizedstringresource/bundledescription.md)
