# isText

Check whether a value is a text descriptor

## Import

```ts
import { isText } from "@videojs/html/i18n";
```

`isText` returns whether a value is a text descriptor: an object with a translation `key` and its English default `text`. Use it to accept either a descriptor or a plain string, as [`translateText`](./translate-text.md) does. See [Translation phrases](./translation-phrases.md) for the built-in descriptors.

```ts
import { isText } from '@videojs/html/i18n';
import { playText } from '@videojs/html/i18n/text/buttons';

isText(playText); // true
isText('Play'); // false
```

## API Reference

`isText(value): value is Text`

### Parameters

| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| `value` (required) | `unknown` | — | Value to check. |

### Return Value

`value is Text`