---
title: "init(width:locale:usage:numberFormatStyle:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/measurement/formatstyle/init(width:locale:usage:numberformatstyle:)"
---

# init(width:locale:usage:numberFormatStyle:)

Creates an instance using the provided width, locale, usage type, and number format.

## Declaration

```swift
init(width: Measurement<UnitType>.FormatStyle.UnitWidth, locale: Locale = .autoupdatingCurrent, usage: MeasurementFormatUnitUsage<UnitType> = .general, numberFormatStyle: FloatingPointFormatStyle<Double>? = nil)
```

## Parameters

- `width`: The width of the measurement unit.
- `locale`: The locale to use when formatting the measurement.
- `usage`: The intended purpose of the formatted measurement.
- `numberFormatStyle`: The presentation style of the numeric value.

## See Also

### Creating a measurement format style

- [init(width:locale:usage:hidesScaleName:numberFormatStyle:)](foundation/measurement/formatstyle/init(width:locale:usage:hidesscalename:numberformatstyle:).md)
