# @enact/i18n

> Internationalization support for Enact using iLib

Latest version **5.6.0** (published 2026-09-02) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @enact/i18n
pnpm add @enact/i18n
yarn add @enact/i18n
bun add @enact/i18n
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 5.6.0 |
| Published | 2026-09-02 |
| First published | 2016-10-19 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 161.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 345 |
| Maintainers | enact |
| Keywords | internationalization, i18n, localization, l10n, globalization, g11n, date, time, format, locale, translation |

## Links

- npm: https://www.npmjs.com/package/@enact/i18n
- Repository: https://github.com/enactjs/enact
- Homepage: https://enactjs.com
- Issues: https://github.com/enactjs/enact/issues
- npm.io page: https://npm.io/package/@enact/i18n

## Dependencies (6)

- [xhr](https://npm.io/package/xhr.md) ^2.6.0
- [ramda](https://npm.io/package/ramda.md) ^0.32.0
- [react](https://npm.io/package/react.md) ^19.2.8
- [react-dom](https://npm.io/package/react-dom.md) ^19.2.8
- [prop-types](https://npm.io/package/prop-types.md) ^15.8.1
- [@enact/core](https://npm.io/package/@enact/core.md) ^5.6.0

## Alternatives

- [messageformat](https://npm.io/package/messageformat.md) — 329.7K weekly downloads
- [@mintlify/scraping](https://npm.io/package/@mintlify/scraping.md) — 294.8K weekly downloads
- [@mintlify/previewing](https://npm.io/package/@mintlify/previewing.md) — 209.5K weekly downloads
- [@mintlify/prebuild](https://npm.io/package/@mintlify/prebuild.md) — 209.5K weekly downloads
- [@mintlify/link-rot](https://npm.io/package/@mintlify/link-rot.md) — 206.3K weekly downloads

## Recent versions

- 5.6.0 (latest) — 2026-09-02
- 5.4.4 (latest-5.4) — 2026-05-22
- 5.0.0-rc.1 (next) — 2025-05-29
- 4.7.12 (latest-4.7) — 2024-09-05
- 4.0.15 (latest-4.0) — 2024-05-28
- 4.5.6 (latest-4.5) — 2023-11-30
- 4.0.13 (production) — 2023-11-29
- 3.2.7 (mr-3.2) — 2022-01-17
- 3.4.9-experimental-7 (experimental-latest) — 2021-11-24
- 2.2.0-alpha.1 (agate) — 2018-09-12
- 5.5.2 — 2026-07-08
- 5.5.1 — 2026-06-01
- 5.5.0 — 2026-05-08
- 5.4.3 — 2026-02-26
- 5.4.2 — 2026-01-28
- … 226 more at https://npm.io/package/@enact/i18n/versions

## README

# @enact/i18n [![npm (scoped)](https://img.shields.io/npm/v/@enact/i18n.svg?style=flat-square)](https://www.npmjs.com/package/@enact/i18n)

> Internationalization library based on iLib.

`@enact/i18n` provides a decorator that can be used to wrap a root component in a React (or Enact) application.
This decorator provides a context to child components that can be used to determine locale text directionality
and to update the current locale.

## Usage

```
import {I18nContextDecorator, I18nDecorator} from '@enact/i18n/I18nDecorator';

const MyComponent = I18nContextDecorator(
	{rtlProp: 'rtl'},
	(props) => (
		<div>{props.rtl ? 'right to left' : 'left to right'}</div>
	)
);

const MyApp = () => (
	<div>
		<MyComponent />
	</div>
);

const MyI18nApp = I18nDecorator(MyApp);

export default MyI18nApp;
```
**Note**: The `@enact/i18n` module will attempt to determine the locale automatically.  Pass a `locale` prop (`"en-US"` for example) to this component where it is rendered to test.

## Install

```
npm install --save @enact/i18n
```

## Acknowledgments

This module is built upon the [iLib](http://github.com/iLib-js/iLib) library.

## Copyright and License Information

Unless otherwise specified, all content, including all source code files and
documentation files in this repository are:

Copyright (c) 2016-2024 LG Electronics

Unless otherwise specified or set forth in the NOTICE file, all content,
including all source code files and documentation files in this repository are:
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this content except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

This work is based on the Apache-2.0 licensed [iLib](http://github.com/iLib-js/iLib)
from JEDLSoft.

---
_Source: https://npm.io/package/@enact/i18n · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
