Skip to content
Back to skills

I18n

ASecurity

- **Package**: `@gate-access/i18n` - **Locales**: `ar` (Arabic), `en` (English) - **Routing**: `[locale]` segment in app routes (e.g. `app/[locale]/dashboard/`) - **RTL**: Arabic uses `dir="rtl"`; English `dir="ltr"`

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 24, 2026
developmenttypescript

Works with

  • cli

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned November 24, 2026

npx -y skills add iDorgham/Workspace-Factory --skill i18n --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of I18n?

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

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

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
---
type: Skill
subagents: [core-validator, integrity-bot]
agents: [master-guide, swarm-router]
dependencies: [core-orchestration, global-sync]
version: 1.0.0
---



# Workspace Factory i18n

## Stack

- **Package**: `@gate-access/i18n`
- **Locales**: `ar` (Arabic), `en` (English)
- **Routing**: `[locale]` segment in app routes (e.g. `app/[locale]/dashboard/`)
- **RTL**: Arabic uses `dir="rtl"`; English `dir="ltr"`

## Route Structure

```
app/
  [locale]/
    layout.tsx      # Sets locale, dir, lang
    dashboard/
    ...
```

Locale comes from URL: `/ar/dashboard`, `/en/dashboard`

## Translations

```typescript
import { useTranslations } from 'next-intl'; // or project i18n hook

function Component() {
  const t = useTranslations('namespace');
  return <span>{t('key')}</span>;
}
```

### With fallback

```typescript
t('key', { defaultValue: 'Fallback text' })
t('scans.exportCsv', { defaultValue: 'Export CSV' })
```

## Locale Switching

- Use `LanguageSwitcher` component or link to `/[locale]/path`
- Persist preference in cookie or user settings
- RTL layout: `dir={locale === 'ar' ? 'rtl' : 'ltr'}` on root

## RTL Layout

- Root layout: `dir={locale === 'ar' ? 'rtl' : 'ltr'}`
- Tailwind RTL: Use `rtl:` variant or logical properties
- Icons: Flip horizontally for RTL where needed
- Nav/sidebar: Swap left/right for RTL

```tsx
<html lang={locale} dir={locale === 'ar' ? 'rtl' : 'ltr'}>
```

## Locale Files

- Location: `packages/i18n/src/locales/` or app-specific
- Structure: JSON nested by namespace
- Keys: `scans.exportCsv`, `settings.billing.exportAll`, etc.

## Checklist for New UI

1. Wrap user-facing text in `t('namespace.key')`
2. Add key to locale JSON (en + ar)
3. Use `defaultValue` for graceful fallback
4. Verify RTL layout if adding nav/sidebar
5. Test locale toggle

## Browser-Use Verification

"Toggle locale (AR/EN) and verify RTL layout and labels."

**Reference:** `packages/i18n/`, `docs/APP_DESIGN_DOCS.md`, `apps/client-dashboard/src/components/language-switcher.tsx`

Files in this skill

  • core.py322 B
  • manifest.yaml156 B
  • skill.md2 KB
  • skill.md.meta.json778 B
  • tests/test_core.py266 B

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.

View all in development →

Comments

Loading comments…

Newsletter

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