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

intlayer-astro

/intlayer-astro

Integruje internacjonalizację Intlayer z aplikacjami Astro: konfiguracja i18n, getIntlayer w komponentach Astro i treści po stronie serwera.

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
21
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 Astro: konfiguracja i18n, getIntlayer w komponentach Astro i treści po stronie serwera.

Wyzwalacze z opisu

setup Astro i18ngetIntlayer
Oryginalny opis (EN)

Integrates Intlayer internationalization with Astro applications. Use when the user asks to "setup Astro i18n", use "getIntlayer" in Astro components, or manage server-side content in Astro.

Jak działa

  1. Setup
  2. Server-side (Astro Components)
  3. Framework Islands
  4. Bundle Optimization
  5. Compiler
  6. References
Sekcje z nagłówków SKILL.md, w oryginale · 66 linii, 232 słów
Podgląd SKILL.md
---
name: intlayer-astro
description: Integrates Intlayer internationalization with Astro applications. Use when the user asks to "setup Astro i18n", use "getIntlayer" in Astro components, or manage server-side content in Astro.
metadata:
  author: Intlayer
  url: https://intlayer.org
  license: Apache-2.0
  mcp-server: "@intlayer/mcp"
  category: productivity
  tags: [i18n]
  documentation: https://intlayer.org/doc
  support: contact@intlayer.org
---

# Intlayer Astro Usage

## Setup

- [Astro](references/environment_astro.md)

The `intlayer()` integration in `astro.config.ts` builds the dictionaries and adds a middleware that resolves the locale of every request into `Astro.locals.intlayer`.

## Server-side (Astro Components)

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

// Locale resolved by the middleware (e.g. /es/about -> 'es')
const { locale } = useLocale();
const content = useIntlayer("my-dictionary-key");
---
<h1>{content.title}</h1>
```

## Framework Islands

Islands use their framework package (`react-intlayer`, `vue-intlayer`, `svelte-intlayer`, `solid-intlayer`, `preact-intlayer`, `lit-intlayer`) and receive the server-detected locale as a prop.

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

- [Astro](references/environment_astro.md)
- [Astro and React](references/environment_astro_react.md)
- [Astro and Vue](references/environment_astro_vue.md)
- [Astro and Svelte](references/environment_astro_svelte.md)
- [Astro and Solid](references/environment_astro_solid.md)
- [Astro and Preact](references/environment_astro_preact.md)
- [Astro and Lit](references/environment_astro_lit.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)
- [Astro Intlayer Exports](references/packages_astro-intlayer_exports.md)
- [astro-intlayer intlayer](references/packages_astro-intlayer_intlayer.md)
- [astro-intlayer onRequest](references/packages_astro-intlayer_onRequest.md)
- [astro-intlayer useDictionary](references/packages_astro-intlayer_useDictionary.md)
- [astro-intlayer useIntlayer](references/packages_astro-intlayer_useIntlayer.md)
- [astro-intlayer useLocale](references/packages_astro-intlayer_useLocale.md)
Pliki w paczce (21)
  • LICENCE.md 11 KB
  • SKILL.md 3 KB
  • references/compiler.md 15 KB
  • references/concept_cli.md 9 KB
  • references/concept_collections.md 6 KB
  • references/concept_variants.md 21 KB
  • references/environment_astro.md 38 KB
  • references/environment_astro_lit.md 39 KB
  • references/environment_astro_preact.md 38 KB
  • references/environment_astro_react.md 38 KB
  • references/environment_astro_solid.md 38 KB
  • references/environment_astro_svelte.md 38 KB
  • references/environment_astro_vue.md 38 KB
  • references/formatters.md 17 KB
  • references/packages_astro-intlayer_exports.md 10 KB
  • references/packages_astro-intlayer_intlayer.md 3 KB
  • references/packages_astro-intlayer_onRequest.md 3 KB
  • references/packages_astro-intlayer_useDictionary.md 3 KB
  • references/packages_astro-intlayer_useIntlayer.md 3 KB
  • references/packages_astro-intlayer_useLocale.md 4 KB
  • references/packages_intlayer_exports.md 12 KB

Wersje

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

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 4555f5f3d27c (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 2 · ranking

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

Podobne skille

  • 100intlayer-vue
    Integruje internacjonalizację Intlayer z aplikacjami Vue.js i Nuxt, w tym composable useIntlayer i zarządzanie tłumaczeniami w komponentach.
  • 100intlayer-next-js
    Integruje internacjonalizację Intlayer z Next.js w wariantach App Router i Pages Router, także dla komponentów serwerowych i tłumaczeń po stronie klienta.
  • 100astro
    Zapewnia standardy i dobre praktyki rozwoju Astro dla stron opartych na treści, dla plików .astro, .ts, .js, .md i .mdx.
  • 100astro
    Wspiera tworzenie stron w Astro: wyspy, kolekcje treści, akcje, renderowanie po stronie serwera i wielkość JavaScriptu.
  • 90astro-i18n
    Wdraża i18n w Astro: routing lokalizacji, getRelativeLocaleUrl i getAbsoluteLocaleUrl, Astro.currentLocale oraz hreflang z mapą witryny.
  • 100astro-actions
    Obsługuje formularze, mutacje i logikę po stronie serwera z bezpieczeństwem typów w Astro przez defineAction i astro:actions.

Uwagi i zgłoszenia

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