open-index/open-npm huggingface dataset:
npm package: @i18n-micro/astro
Description: Astro integration for internationalization using the same core logic as Nuxt I18n Micro. Provides translations, route-specific support, and full TypeScript support for Astro projects.
Latest version: 1.3.3

# @i18n-micro/astro

Astro integration for internationalization using the same core logic as Nuxt I18n Micro. Provides translations, route-specific support, and full TypeScript support for Astro projects.

## Installation

```bash
pnpm add @i18n-micro/astro
# or
npm install @i18n-micro/astro
# or
yarn add @i18n-micro/astro
```

## Quick Start

### 1. Add Integration to `astro.config.mjs`

```javascript
import { defineConfig } from 'astro/config'
import { i18nIntegration } from '@i18n-micro/astro'

export default defineConfig({
  integrations: [
    i18nIntegration({
      locale: 'en',
      fallbackLocale: 'en',
      locales: [
        { code: 'en', iso: 'en-US', displayName: 'English' },
        { code: 'fr', iso: 'fr-FR', displayName: 'Français' },
      ],
      messages: {
        en: { greeting: 'Hello, {name}!' },
        fr: { greeting: 'Bonjour, {name}!' },
      },
    }),
  ],
})
```

### 2. Use in Pages

```astro
---
// src/pages/index.astro
import { useI18n } from '@i18n-micro/astro'

const { t, locale } = useI18n(Astro)
---

<html>
  <head>
    <title>{t('greeting', { name: 'World' })}</title>
  </head>
  <body>
    <h1>{t('greeting', { name: 'World' })}</h1>
  </body>
</html>
```

## Resources

- **Repository**: [https://github.com/s00d/nuxt-i18n-micro](https://github.com/s00d/nuxt-i18n-micro)
- **Documentation**: [https://s00d.github.io/nuxt-i18n-micro/](https://s00d.github.io/nuxt-i18n-micro/)

## License

MIT
npm package: @i18n-micro/devtools-ui
Description: UI component library for i18n DevTools. Provides a customizable interface for managing translations in development mode.
Latest version: 1.2.0

# @i18n-micro/devtools-ui

UI component library for i18n DevTools. Provides a customizable interface for managing translations in development mode.

## Installation

```bash
pnpm add @i18n-micro/devtools-ui
# or
npm install @i18n-micro/devtools-ui
# or
yarn add @i18n-micro/devtools-ui
```

## Quick Start

This package is primarily used internally by other `@i18n-micro` packages for DevTools integration. For usage examples, see the documentation.

## Resources

- **Repository**: [https://github.com/s00d/nuxt-i18n-micro](https://github.com/s00d/nuxt-i18n-micro)
- **Documentation**: [https://s00d.github.io/nuxt-i18n-micro/](https://s00d.github.io/nuxt-i18n-micro/)

## License

MIT
npm package: @i18n-micro/node
Description: Node.js runtime for nuxt-i18n-micro - use i18n translations in any Node.js application, CLI tool, or backend service.
Latest version: 1.2.0

# @i18n-micro/node

Node.js runtime for nuxt-i18n-micro - use i18n translations in any Node.js application, CLI tool, or backend service.

## Installation

```bash
pnpm add @i18n-micro/node
# or
npm install @i18n-micro/node
# or
yarn add @i18n-micro/node
```

## Quick Start

```typescript
import { createI18n } from '@i18n-micro/node'

// 1. Create I18n instance
const i18n = createI18n({
  locale: 'en',
  fallbackLocale: 'en',
  translationDir: './locales', // Path to your locales directory
  disablePageLocales: false, // If true, ignores pages/ folder and treats all files as global translations
})

// 2. Load translations from directory (recursive, supports pages structure)
await i18n.loadTranslations()

// 3. Use translations
console.log(i18n.t('greeting', { name: 'John' })) // "Hello, John!"
console.log(i18n.tc('apples', 5)) // "5 apples"
```

## Resources

- **Repository**: [https://github.com/s00d/nuxt-i18n-micro](https://github.com/s00d/nuxt-i18n-micro)
- **Documentation**: [https://s00d.github.io/nuxt-i18n-micro/](https://s00d.github.io/nuxt-i18n-micro/)

## License

MIT
npm package: @i18n-micro/preact
Description: Pure Preact plugin for internationalization using the same core logic as Nuxt I18n Micro. Provides reactive translations, route-specific support, and full TypeScript support. Works with any router (wouter, preact-router) or without a router.
Latest version: 1.2.0

# @i18n-micro/preact

Pure Preact plugin for internationalization using the same core logic as Nuxt I18n Micro. Provides reactive translations, route-specific support, and full TypeScript support. Works with any router (wouter, preact-router) or without a router.

## Installation

```bash
pnpm add @i18n-micro/preact
# or
npm install @i18n-micro/preact
# or
yarn add @i18n-micro/preact
```

## Quick Start

```typescript
import { render } from 'preact'
import { createI18n, I18nProvider, useI18n } from '@i18n-micro/preact'

const i18n = createI18n({
  locale: 'en',
  fallbackLocale: 'en',
  messages: {
    en: {
      greeting: 'Hello, {name}!',
      apples: 'no apples | one apple | {count} apples',
    },
    fr: {
      greeting: 'Bonjour, {name}!',
      apples: 'pas de pommes | une pomme | {count} pommes',
    },
  },
})

function App() {
  return (
    <I18nProvider i18n={i18n}>
      <MyComponent />
    </I18nProvider>
  )
}
```

### Usage in Components

```tsx
import { useI18n } from '@i18n-micro/preact'

function MyComponent() {
  const { t, tc, locale, setLocale } = useI18n()

  return (
    <div>
      <p>{t('greeting', { name: 'World' })}</p>
      <p>{tc('apples', 5)}</p>
      <button onClick={() => setLocale('fr')}>Switch to French</button>
    </div>
  )
}
```

## Resources

- **Repository**: [https://github.com/s00d/nuxt-i18n-micro](https://github.com/s00d/nuxt-i18n-micro)
- **Documentation**: [https://s00d.github.io/nuxt-i18n-micro/](https://s00d.github.io/nuxt-i18n-micro/)

## License

MIT
npm package: @i18n-micro/react
Description: React plugin for internationalization using the same core logic as Nuxt I18n Micro. Provides reactive translations, route-specific support, and full TypeScript support.
Latest version: 1.3.0

# @i18n-micro/react

React plugin for internationalization using the same core logic as Nuxt I18n Micro. Provides reactive translations, route-specific support, and full TypeScript support.

## Installation

```bash
pnpm add @i18n-micro/react
# or
npm install @i18n-micro/react
# or
yarn add @i18n-micro/react
```

## Quick Start

```typescript
import React from 'react'
import { createI18n, I18nProvider, useI18n } from '@i18n-micro/react'

const i18n = createI18n({
  locale: 'en',
  fallbackLocale: 'en',
  messages: {
    en: {
      greeting: 'Hello, {name}!',
      apples: 'no apples | one apple | {count} apples',
    },
    fr: {
      greeting: 'Bonjour, {name}!',
      apples: 'pas de pommes | une pomme | {count} pommes',
    },
  },
})

function App() {
  return (
    <I18nProvider i18n={i18n}>
      <MyComponent />
    </I18nProvider>
  )
}
```

### Usage in Components

```tsx
import { useI18n } from '@i18n-micro/react'

function MyComponent() {
  const { t, tc, locale, setLocale } = useI18n()

  return (
    <div>
      <p>{t('greeting', { name: 'World' })}</p>
      <p>{tc('apples', 5)}</p>
      <button onClick={() => setLocale('fr')}>Switch to French</button>
    </div>
  )
}
```

## Resources

- **Repository**: [https://github.com/s00d/nuxt-i18n-micro](https://github.com/s00d/nuxt-i18n-micro)
- **Documentation**: [https://s00d.github.io/nuxt-i18n-micro/](https://s00d.github.io/nuxt-i18n-micro/)

## License

MIT
npm package: @i18n-micro/solid
Description: SolidJS plugin for internationalization using the same core logic as Nuxt I18n Micro. Provides reactive translations, route-specific support, and full TypeScript support.
Latest version: 1.2.0

# @i18n-micro/solid

SolidJS plugin for internationalization using the same core logic as Nuxt I18n Micro. Provides reactive translations, route-specific support, and full TypeScript support.

## Installation

```bash
pnpm add @i18n-micro/solid
# or
npm install @i18n-micro/solid
# or
yarn add @i18n-micro/solid
```

## Quick Start

```typescript
import { render } from 'solid-js/web'
import { createI18n, I18nProvider, useI18n } from '@i18n-micro/solid'

const i18n = createI18n({
  locale: 'en',
  fallbackLocale: 'en',
  messages: {
    en: {
      greeting: 'Hello, {name}!',
      apples: 'no apples | one apple | {count} apples',
    },
    fr: {
      greeting: 'Bonjour, {name}!',
      apples: 'pas de pommes | une pomme | {count} pommes',
    },
  },
})

function App() {
  return (
    <I18nProvider i18n={i18n}>
      <MyComponent />
    </I18nProvider>
  )
}

const root = document.getElementById('root')!
render(() => <App />, root)
```

### Usage in Components

```tsx
import { useI18n } from '@i18n-micro/solid'

function MyComponent() {
  const { t, tc, locale, setLocale } = useI18n()

  return (
    <div>
      <p>{t('greeting', { name: 'World' })}</p>
      <p>{tc('apples', 5)}</p>
      <button onClick={() => setLocale('fr')}>FR</button>
    </div>
  )
}
```

## Resources

- **Repository**: [https://github.com/s00d/nuxt-i18n-micro](https://github.com/s00d/nuxt-i18n-micro)
- **Documentation**: [https://s00d.github.io/nuxt-i18n-micro/](https://s00d.github.io/nuxt-i18n-micro/)

## License

MIT