[**@wocart/theme v4.1.0**](../../README)

***

[@wocart/theme](../../README) / [index](../README) / formatMessage

# Function: formatMessage()

> **formatMessage**(`pack`, `key`, `values`, `options`): `string`

The message `key` from `pack`, with its plural form chosen by
`values.count` and its placeholders filled. A key the pack does not carry
renders as the key itself, so a missing string is visible, never blank.

## Parameters

### pack

`Pack`

### key

`string`

### values

`Readonly`\<`Record`\<`string`, `string` \| `number`\>\>

### options

[`MessageOptions`](../interfaces/MessageOptions)

## Returns

`string`
