# i18n
Documentation: [Chrome i18n API](https://developer.chrome.com/docs/extensions/reference/i18n)
A promise-based wrapper for the Chrome `i18n` API.
## Methods
- [detectI18Language(text)](#detectI18Language)
- [getI18nAcceptLanguages()](#getI18nAcceptLanguages)
- [getI18nUILanguage()](#getI18nUILanguage)
- [getI18nMessage(key)](#getI18nMessage)
- [getDefaultLanguage()](#getDefaultLanguage)
---
### detectI18Language
```
detectI18Language(text: string): Promise
```
Detects the primary language of the provided text.
### getI18nAcceptLanguages
```
getI18nAcceptLanguages(): Promise
```
Retrieves the user's preferred accept languages list.
### getI18nUILanguage
```
getI18nUILanguage(): string | undefined
```
Returns the browser's UI language code.
### getI18nMessage
```
getI18nMessage(key: string): string | undefined
```
Retrieves the localized message for the specified key.
### getDefaultLanguage
```
getDefaultLanguage(): string | undefined
```
Extracts the default locale as declared in the extension manifest.