[**@wocart/storefront v3.1.0**](../../README)

***

[@wocart/storefront](../../README) / [index](../README) / servedLanguage

# Function: servedLanguage()

> **servedLanguage**(`config`, `code?`): [`StorefrontLanguage`](../interfaces/StorefrontLanguage)

The served language with `code` (the store's primary by default), or `null`
when the store does not serve it — the shape a theme reads `<html dir>` and
a language switcher's labels from.

## Parameters

### config

`Pick`\<[`StoreConfig`](../interfaces/StoreConfig), `"lang"` \| `"locales"`\>

### code?

`string`

## Returns

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