# textOrMessage

A definition's text as a placeholder value for a [`Message`](https://docs.mapcairn.com/api/core/Message-typealias.md): a key
becomes a message with no parameters, which the one place that speaks the
sentence formats in the active language, and a plain string stays as it is.
Use it where a pure helper builds an announcement from a definition's name
and has no catalogue to hand. A [`HostText`](https://docs.mapcairn.com/api/core/HostText.md) is passed on as it is:
`formatMessage` reads it with the active catalogue.

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

## Signature

```ts
import { textOrMessage } from "@mapcairn/core";
 
function textOrMessage(text: DefinitionText): MessagePart;
```

## Parameters

- `text` (`DefinitionText`)

## Returns

`MessagePart`

## See also

- [`DefinitionText`](https://docs.mapcairn.com/api/core/DefinitionText.md)
- [`MessagePart`](https://docs.mapcairn.com/api/core/MessagePart.md)

Source: [packages/core/src/messages/resolveText.ts:84](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/messages/resolveText.ts#L84)
