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

intlayer-solid

/intlayer-solid

Integruje internacjonalizację Intlayer z komponentami SolidJS, w tym tłumaczone komponenty, hook useIntlayer i konfigurację providerów.

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
15
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 komponentami SolidJS, w tym tłumaczone komponenty, hook useIntlayer i konfigurację providerów.

Wyzwalacze z opisu

setup SolidJS i18nuseIntlayer
Oryginalny opis (EN)

Integrates Intlayer internationalization with SolidJS components. Use when the user asks to "setup SolidJS i18n", create a new translated component, use the "useIntlayer" hook in Solid, or configure providers.

Jak działa

  1. Core Philosophy
  2. Workflow
  3. Setup
  4. useIntlayer Hook
  5. Bundle Optimization
  6. Compiler
  7. References
Sekcje z nagłówków SKILL.md, w oryginale · 102 linii, 325 słów
Podgląd SKILL.md
---
name: intlayer-solid
description: Integrates Intlayer internationalization with SolidJS components. Use when the user asks to "setup SolidJS i18n", create a new translated component, use the "useIntlayer" hook in Solid, or configure providers.
metadata:
  author: Intlayer
  url: https://intlayer.org
  license: Apache-2.0
  mcp-server: "@intlayer/mcp"
  category: productivity
  tags: [i18n, solid, vite]
  documentation: https://intlayer.org/doc
  support: contact@intlayer.org
---

# Intlayer Solid 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 Solid components that use them.

## Workflow

To create a translated component, you need two files:

1.  **Declaration:** A content file (e.g., `myComponent.content.ts`) defining the dictionary.
2.  **Implementation:** A Solid component (e.g., `MyComponent.tsx`) using the `useIntlayer` hook.

### Declare Content

Create a content file using `t()` for translations.
**File:** `src/components/MyComponent/myComponent.content.ts`

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

const content = {
  // The 'key' must be unique and matches what you pass to useIntlayer()
  key: "my-component",
  content: {
    text: t({
      en: "Welcome",
      fr: "Bienvenue",
      es: "Hola",
    }),
  },
} satisfies Dictionary;

export default content;
```

## Setup

- [Vite and Solid](references/environment_vite-and-solid.md)
- [SolidStart](references/environment_solid-start.md)
- [TanStack Start and Solid](references/environment_tanstack-start_solid.md)

## useIntlayer Hook

> [!IMPORTANT]
> In Solid, `useIntlayer` returns reactive content (e.g., `content`). You can access its properties directly.

```tsx
import { useIntlayer } from "solid-intlayer";

const MyComponent = () => {
  const content = useIntlayer("my-component");

  return (
    <div>
      <h1>
        {/* Return content */}
        {content.text}
      </h1>
      {/* Return string (.value) */}
      <img src={content.text.value} alt={content.text.value} />
    </div>
  );
};
```

## 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

- [Vite and Solid](references/environment_vite-and-solid.md)
- [SolidStart](references/environment_solid-start.md)
- [TanStack Start and Solid](references/environment_tanstack-start_solid.md)

### Concepts

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

### Packages

- [Solid Intlayer Exports](references/packages_solid-intlayer_exports.md)
- [solid-intlayer IntlayerProvider](references/packages_solid-intlayer_IntlayerProvider.md)
- [solid-intlayer useIntlayer](references/packages_solid-intlayer_useIntlayer.md)
- [solid-intlayer useLocale](references/packages_solid-intlayer_useLocale.md)
- [solid-intlayer usePathname](references/packages_solid-intlayer_usePathname.md)
- [solid-intlayer useRewriteURL](references/packages_solid-intlayer_useRewriteURL.md)
Pliki w paczce (15)
  • LICENCE.md 11 KB
  • SKILL.md 4 KB
  • references/compiler.md 15 KB
  • references/concept_collections.md 6 KB
  • references/concept_variants.md 21 KB
  • references/environment_solid-start.md 53 KB
  • references/environment_tanstack-start_solid.md 55 KB
  • references/environment_vite-and-solid.md 41 KB
  • references/formatters.md 17 KB
  • references/packages_solid-intlayer_IntlayerProvider.md 2 KB
  • references/packages_solid-intlayer_exports.md 5 KB
  • references/packages_solid-intlayer_useIntlayer.md 2 KB
  • references/packages_solid-intlayer_useLocale.md 2 KB
  • references/packages_solid-intlayer_usePathname.md 3 KB
  • references/packages_solid-intlayer_useRewriteURL.md 2 KB

Wersje

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

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

Migawka bazy z 28.10.2026 · wersja paczki 7f34d91cc4e7 (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-preact
    Integruje internacjonalizację Intlayer z aplikacjami Preact, w tym tłumaczone komponenty, hook useIntlayer i konfigurację providerów.
  • 90frontend-solidjs-architecture
    Projektuje aplikacje SolidJS z reaktywnością drobnoziarnistą, sygnałami, stores, komponentami sterowania i routerem @solidjs/router.
  • 90frontend-solidjs-patterns
    Stosuje wzorce SolidJS: createResource z Suspense, formularze na sygnałach, kompozycję przez children-funkcje i animacje przejść.
  • 100solid
    Obsługuje renderer SolidJS dla json-render: katalogi i rejestry @json-render/solid, dostawców Renderer, bindingi, akcje oraz reaktywność specyficzną dla Solid.
  • 90solid-js-expert
    Rozstrzyga problemy z reaktywnością, routingiem i granicami serwer/klient w SolidJS i SolidStart oraz migracją z Reacta.

Uwagi i zgłoszenia

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