Skip to content
Back to skills

I18n Patterns

ASecurity

Internationalization and translation patterns in LivestockAI

  • 666 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added February 9, 2026
developmenttypescriptreact

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill i18n-patterns --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of I18n Patterns?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for I18n Patterns
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-i18n-patterns/badge)](https://www.skillsdirectory.com/skills/majiayu000-i18n-patterns)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: i18n Patterns
description: Internationalization and translation patterns in LivestockAI
---

# i18n Patterns

LivestockAI supports multiple languages using i18next.

## Configuration

The i18n config is in `app/lib/i18n/`:

```typescript
import i18n from 'i18next'
import { initReactI18next } from 'react-i18next'

i18n.use(initReactI18next).init({
  lng: 'en',
  fallbackLng: 'en',
  interpolation: {
    escapeValue: false,
  },
})
```

## Using Translations

```typescript
import { useTranslation } from 'react-i18next'

function MyComponent() {
  const { t } = useTranslation()

  return (
    <div>
      <h1>{t('dashboard.title')}</h1>
      <p>{t('dashboard.welcome', { name: user.name })}</p>
    </div>
  )
}
```

## Supported Languages

| Code | Language   | Status      |
| ---- | ---------- | ----------- |
| en   | English    | Complete    |
| fr   | French     | Complete    |
| es   | Spanish    | Complete    |
| pt   | Portuguese | Complete    |
| sw   | Swahili    | Complete    |
| ha   | Hausa      | In progress |
| ar   | Arabic     | Planned     |

## Translation Files

Translations are in `app/lib/i18n/locales/`:

```
locales/
├── en.json
├── fr.json
├── es.json
├── pt.json
├── sw.json
└── ha.json
```

## Key Namespaces

```json
{
  "common": {
    "save": "Save",
    "cancel": "Cancel",
    "delete": "Delete"
  },
  "dashboard": {
    "title": "Dashboard",
    "welcome": "Welcome, {{name}}"
  },
  "batches": {
    "title": "Batches",
    "create": "Create Batch"
  }
}
```

## Pluralization

```typescript
// Translation file
{
  "birds": "{{count}} bird",
  "birds_plural": "{{count}} birds"
}

// Usage
t('birds', { count: 1 })  // "1 bird"
t('birds', { count: 5 })  // "5 birds"
```

## Date/Number Formatting

Use user settings for locale-aware formatting:

```typescript
import { useFormatDate, useFormatNumber } from '~/features/settings'

function MyComponent() {
  const formatDate = useFormatDate()
  const formatNumber = useFormatNumber()

  return (
    <div>
      <span>{formatDate(new Date())}</span>
      <span>{formatNumber(1234.56)}</span>
    </div>
  )
}
```

## Related Skills

- `multi-currency` - Currency formatting
- `rugged-utility` - UI design principles

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.