Przejdź do treści
Biblioteka skilli
Programowanie · Integracja z narzędziem

intlayer-remix

/intlayer-remix

Integruje internacjonalizację Intlayer z aplikacjami Remix 3, w tym middleware routera oraz hooki useIntlayer i useLocale w obsłudze tras i widokach.

Repozytorium
intlayer ↗
Licencja
Apache-2.0
Ostatnia zmiana repozytorium
27.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
14
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
4
Przestarzałość

Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co robi i kiedy

Integruje internacjonalizację Intlayer z aplikacjami Remix 3, w tym middleware routera oraz hooki useIntlayer i useLocale w obsłudze tras i widokach.

Wyzwalacze z opisu

setup Remix i18nuseIntlayeruseLocale
Oryginalny opis (EN)

Integrates Intlayer internationalization with Remix 3 applications. Use when the user asks to "setup Remix i18n", register the Intlayer router middleware, or use the "useIntlayer" / "useLocale" hooks in Remix route handlers and views.

Jak działa

  1. Core Philosophy
  2. Setup
  3. Hooks
  4. Bundle Optimization
  5. Compiler
  6. References
Sekcje z nagłówków SKILL.md, w oryginale · 87 linii, 321 słów
Podgląd SKILL.md
---
name: intlayer-remix
description: Integrates Intlayer internationalization with Remix 3 applications. Use when the user asks to "setup Remix i18n", register the Intlayer router middleware, or use the "useIntlayer" / "useLocale" hooks in Remix route handlers and views.
metadata:
  author: Intlayer
  url: https://intlayer.org
  license: Apache-2.0
  mcp-server: "@intlayer/mcp"
  category: productivity
  tags: [i18n, remix]
  documentation: https://intlayer.org/doc
  support: contact@intlayer.org
---

# Intlayer Remix Usage

## Core Philosophy

Intlayer promotes **Component-Level Content Declaration**. Instead of a massive global translation file, content is declared in `*.content.ts` files adjacent to the views that use them.

### Declare Content

**File:** `src/views/home.content.ts`

```typescript
import { t, type Dictionary } from "intlayer";

const content = {
  key: "home",
  content: {
    title: t({
      en: "Welcome",
      fr: "Bienvenue",
      es: "Hola",
    }),
  },
} satisfies Dictionary;

export default content;
```

## Setup

- [Remix 3](references/environment_remix-3.md)

Register the `intlayer()` [router middleware](references/packages_remix-intlayer_intlayerMiddleware.md) in `createRouter()`, before `render()`. It strips the locale prefix before route matching, so routes are declared once without a `:locale` segment.

## Hooks

`useIntlayer`, `useDictionary` and `useLocale` read the request locale with no argument, anywhere downstream of the middleware (route handlers and `remix/ui` views).

```tsx
import { useIntlayer, useLocale } from "remix-intlayer";

export const HomePage = () => () => {
  const { locale, availableLocales } = useLocale();
  const home = useIntlayer("home");

  return <h1>{home.title}</h1>;
};
```

> - `useIntlayer("home", "fr")` overrides the request locale for one call.
> - Remix JSX is not React: `class` is written as-is, and re-renders are triggered with `handle.update()`.
> - Outside of a request, the hooks fall back to the default locale.

## Bundle Optimization

Read content fields by name (dot access or destructuring) so the build can purge and minify the dictionary. Never index content at runtime (`content.statuses[status]`, use `select()`), and call `useIntlayer` in each child component instead of passing content as a prop. See the `intlayer-bundle-optimization` skill.

## Compiler

The [Intlayer Compiler](references/compiler.md) can extract all your content keys from your components, using one CLI command (`npx intlayer extract`) or automatically at app build.

## References

- [Website](https://intlayer.org)
- [Doc](https://intlayer.org/doc)

### Environments

- [Remix 3](references/environment_remix-3.md)

### Concepts

- [Variants](references/concept_variants.md)
- [Collections](references/concept_collections.md)
- [Compiler](references/compiler.md)
- [Formatters (number, currency, date, …)](references/formatters.md)

### Packages

- [Intlayer Exports](references/packages_intlayer_exports.md)
- [Remix Intlayer Exports](references/packages_remix-intlayer_exports.md)
- [remix-intlayer Intlayer](references/packages_remix-intlayer_Intlayer.md)
- [remix-intlayer intlayerMiddleware](references/packages_remix-intlayer_intlayerMiddleware.md)
- [remix-intlayer useDictionary](references/packages_remix-intlayer_useDictionary.md)
- [remix-intlayer useIntlayer](references/packages_remix-intlayer_useIntlayer.md)
- [remix-intlayer useLocale](references/packages_remix-intlayer_useLocale.md)
Pliki w paczce (14)
  • LICENCE.md 11 KB
  • SKILL.md 3 KB
  • references/compiler.md 15 KB
  • references/concept_collections.md 6 KB
  • references/concept_variants.md 21 KB
  • references/environment_remix-3.md 21 KB
  • references/formatters.md 17 KB
  • references/packages_intlayer_exports.md 12 KB
  • references/packages_remix-intlayer_Intlayer.md 2 KB
  • references/packages_remix-intlayer_exports.md 10 KB
  • references/packages_remix-intlayer_intlayerMiddleware.md 4 KB
  • references/packages_remix-intlayer_useDictionary.md 3 KB
  • references/packages_remix-intlayer_useIntlayer.md 3 KB
  • references/packages_remix-intlayer_useLocale.md 3 KB

Wersje

W bazie nie ma innych skilli o nazwie intlayer-remix.

Identyczna treść występuje jeszcze w 1 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.

Migawka bazy z 13.11.2026 · wersja paczki b3c9d650646d (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100intlayer-react
    Integruje internacjonalizację Intlayer z aplikacjami React, w tym tłumaczone komponenty, hook useIntlayer i konfigurację providerów.
  • 100intlayer-vue
    Integruje internacjonalizację Intlayer z aplikacjami Vue.js i Nuxt, w tym composable useIntlayer i zarządzanie tłumaczeniami w komponentach.
  • 95remix
    Buduje i przegląda aplikacje Remix 3 z pakietem npm remix: struktura aplikacji, trasy, kontrolery, middleware, walidacja, dostęp do danych, uwierzytelnianie, sesje, pliki, komponenty UI i testy.
  • 100remix
    Buduje i przegląda aplikacje Remix 3 z pakietem npm remix: trasy, kontrolery, middleware, walidacja, dostęp do danych, autoryzacja, sesje, uploady, hydratacja i testy.
  • 90remix-v2-routing-review
    Przegląda pliki tras Remix v2 w app/routes/ pod kątem naruszeń konwencji nazewnictwa, brakujących layoutów, kształtu tras zasobów i pozostałości z v1.
  • 90frontend-remix-architecture
    Projektuje architekturę Remix: routing zagnieżdżony z Outlet, trasy układowe, loadery i akcje, sesje oraz wdrożenie w Vite.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.