Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

hebrew-i18n

БесплатноЗапускает вложенные скриптыНе проверен

Implement comprehensive Hebrew internationalization (i18n) patterns for web and mobile applications. Use when user asks about Hebrew localization…

skills-ilот skills-il★ 28 звёзд на GitHub

Об этом скилле

Hebrew I18n

Instructions

Step 1: Set Up the I18n Framework

Direction belongs on the root <html> element, not on a wrapper div. In a single-page app that switches language at runtime, update it whenever the locale changes:

function applyLocale(locale) {
  document.documentElement.lang = locale;
  document.documentElement.dir = locale === 'he' ? 'rtl' : 'ltr';
}

React (react-intl):

import { useEffect } from 'react';
import { IntlProvider } from 'react-intl';
import heMessages from './locales/he.json';

function App() {
  useEffect(() => applyLocale('he'), []);
  return (
    <IntlProvider locale="he" messages={heMessages}>
      {/* App content */}
    </IntlProvider>
  );
}

React (react-i18next): i18next does not use ICU plural syntax by default. It selects a key suffix from Intl.PluralRules, so Hebrew needs _one, _two and _other keys:

{
  "days_one": "יום אחד",
  "days_two": "יומיים",
  "days_other": "{{count}} ימים"
}

Call it as t('days', { count }). Since i18next v24 there is no fallback when Intl.PluralRules is missing, so only English-style _one/_other resolve and the _two form silently never appears. The i18next docs note that React Native's Hermes engine lacks Intl.PluralRules; check typeof Intl.PluralRules on your target and add a polyfill (such as intl-pluralrules) if it is undefined.

Vue (vue-i18n): vue-i18n plurals are pipe-separated, not ICU. vue-i18n 11.x (the current release line) chooses the case by position, not by Intl.PluralRules: three cases are read as zero | one | other, so without a rule t('days', 1) prints the second case. For Hebrew, register a rule that maps 1, 2 and every other count to the three cases, and call it as t('days', count):

import { createI18n } from 'vue-i18n';

// cases: one | two | other
const hePlural = (choice) => (choice === 1 ? 0 : choice === 2 ? 1 : 2);

const i18n = createI18n({
  legacy: false, // 11.x defaults to legacy mode, which ignores pluralRules
  locale: 'he',
  fallbackLocale: 'en',
  pluralRules: { he: hePlural }, // in legacy mode the option is pluralizationRules
  messages: { he: heMessages, en: enMessages }, // he: { days: 'יום אחד | יומיים | {count} ימים' }
});
// t('days', 2) -> "יומיים"

Automatic selection by Intl.PluralRules is a breaking change on the vue-i18n main branch and is not in the 11.x releases.

Next.js App Router (next-intl):

// src/i18n/routing.ts
import { defineRouting } from 'next-intl/routing';
export const routing = defineRouting({
  locales: ['he', 'en'],
  defaultLocale: 'he',
});
// src/proxy.ts (named middleware.ts before Next.js 16)
import createMiddleware from 'next-intl/middleware';
import { routing } from './i18n/routing';

export default createMiddleware(routing);

export const config = {
  matcher: '/((?!api|trpc|_next|_vercel|.*\\..*).*)'
};
// src/i18n/request.ts (supplies locale and messages to getTranslations / useTranslations)
import { hasLocale } from 'next-intl';
import { getRequestConfig } from 'next-intl/server';
import { routing } from './routing';
import { notFound } from 'next/navigation';
import * as rootParams from 'next/root-params';

export default getRequestConfig(async ({ locale }) => {
  if (!locale) {
    const paramValue = await rootParams.locale();
    if (hasLocale(routing.locales, paramValue)) {
      locale = paramValue;
    } else {
      notFound();
    }
  }
  return {
    locale,
    messages: (await import(`../../messages/${locale}.json`)).default
  };
});

next/root-params is available by default from Next.js 16.3. On earlier Next.js versions it must be enabled with experimental.rootParams in next.config.ts. Wire request.ts in with the createNextIntlPlugin wrapper from next-intl/plugin in next.config.ts.

// src/app/[locale]/layout.tsx
import { NextIntlClientProvider } from 'next-intl';
import { getLocale } from 'next-intl/server';

export default async function LocaleLayout({ children }) {
  const locale = await getLocale();
  return (
    <html lang={locale} dir={locale === 'he' ? 'rtl' : 'ltr'}>
      <body>
        <NextIntlClientProvider>{children}</NextIntlClientProvider>
      </body>
    </html>
  );
}

Rendered from a Server Component, NextIntlClientProvider inherits locale and messages from request.ts, so there is no need to call getMessages() and pass them in.

Angular:

// angular.json -- add Hebrew locale
"i18n": {
  "sourceLocale": "en",
  "locales": {
    "he": "src/locale/messages.he.xlf"
  }
}

Also set "localize": true (or an array of locale IDs) in the build options, otherwise the CLI does not generate the Hebrew build.

Step 2: Hebrew Plural Forms

Hebrew has three plural categories that i18n frameworks must handle:

Category Hebrew Term Count Example
one (singular) יחיד 1, and decimals below 1 פריט אחד (one item)
Полный SKILL.md на GitHub

Установить hebrew-i18n в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

SKILL_HE.mdevidence.jsonmetadata.jsonoptimization-log.jsonreferences/bidi.mdreferences/pluralization.mdscripts/generate_i18n.py

FAQ

Что делает скилл hebrew-i18n?

Implement comprehensive Hebrew internationalization (i18n) patterns for web and mobile applications. Use when user asks about Hebrew localization, "beinle'umiyut", i18n for Israeli apps, Hebrew plural forms, Hebrew date formatting, RTL CSS logical properties, bidirectional text handling, React/Vue/Angular/Next.js RTL integration, Tailwind CSS RTL, or next-intl setup. Covers Hebrew pluralization rules, date and number formatting for Israel, RTL-first CSS, Tailwind RTL utilities, and bidi text algorithms. Do NOT use for NLP or content writing (use hebrew-nlp-toolkit or hebrew-content-writer instead).

Как установить скилл hebrew-i18n?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл hebrew-i18n запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить hebrew-i18n с