# formatMessage

Turns a [`Message`](https://docs.mapcairn.com/api/core/Message-typealias.md) into text with `catalogue`. A placeholder that holds
another message, or a list with messages among its items, is formatted
first, so a sentence can carry a distance, a travel mode or a layer's name
and the whole thing is in one language. A message with a count goes
through `plural`, so the active catalogue chooses whether it has forms.

This is a function exported by `@mapcairn/core`, checked against version 0.2.0.

## Signature

```ts
import { formatMessage } from "@mapcairn/core";
 
function formatMessage(catalogue: MessageCatalogue, input: Message): string;
```

## Parameters

- `catalogue` (`MessageCatalogue`)
- `{ key, params }`
- `input` (`Message`)

## Returns

`string`

## See also

- [`MessageCatalogue`](https://docs.mapcairn.com/api/core/MessageCatalogue.md)
- [`Message`](https://docs.mapcairn.com/api/core/Message-typealias.md)

Source: [packages/core/src/messages/formatMessage.ts:39](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/messages/formatMessage.ts#L39)
