# languageDirection

Resolves a language's reading direction, preferring the host's override.
Invalid tags and environments without locale text information fall back to
left-to-right.

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

## Signature

```ts
import { languageDirection } from "@mapcairn/core";
 
function languageDirection(tag: string, offered?: readonly LanguageOption[]): "ltr" | "rtl";
```

## Parameters

- `tag` (`string`)
- `offered?` (`readonly LanguageOption[]`)

## Returns

`"ltr" | "rtl"`

## See also

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

Source: [packages/core/src/messages/languageDirection.ts:10](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/messages/languageDirection.ts#L10)
