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

# locale

The locale to use when scanning.

## Declaration

```swift
var locale: Any? { get set }
```

## Discussion

Discussion A scanner’s locale affects the way it interprets numeric values from the string. In particular, a scanner uses the locale’s decimal separator to distinguish the integer and fractional parts of floating-point representations. A scanner with no locale set uses non-localized values. New scanners have no locale by default.

## See Also

### Configuring a Scanner

- [scanLocation](foundation/scanner/scanlocation.md)
- [caseSensitive](foundation/scanner/casesensitive.md)
- [charactersToBeSkipped](foundation/scanner/characterstobeskipped.md)
