open-index/open-npm huggingface dataset:
npm package: @jared-localization/localization-sdk
Description: Localization SDK for **React** and **React Native** with remote translations, runtime language switching, and clean developer experience.
Latest version: 1.0.3

# Localization SDK

Localization SDK for **React** and **React Native** with remote translations, runtime language switching, and clean developer experience.

## Installation

### npm

```bash
npm install @jared-localization/localization-sdk
```

### yarn

```bash
yarn add @jared-localization/localization-sdk
```

## React Native (Expo)

If you are using Expo, install AsyncStorage to persist selected language:

```bash
npx expo install @react-native-async-storage/async-storage
```

## Quick Start

```javascript
import { LocalizationProvider } from "@jared-localization/localization-sdk";

export function App() {
  return (
    <LocalizationProvider apiKey="[YOUR_API_KEY]" projectKey="[YOUR_PROJECT_KEY]">
      <YourApp />
    </LocalizationProvider>
  );
```

| Parameter | Type     | Description                |
| :-------- | :------- | :------------------------- |
| `apiKey` | `string` | **Required**. Your API key |
| `projectKey` | `string` | **Required**. Your Project key |

### Use translations in components
```javascript
import { useLocalization } from "@jared-localization/localization-sdk";

export function HomeScreen() {
  const { t, changeLanguage } = useLocalization();

  return (
    <>
      <h1>{t("home.title")}</h1>

      <button onClick={() => changeLanguage("ua")}>
        Switch language
      </button>
    </>
  );
}
```