intlayer-astro
/intlayer-astro
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.
- Author
- aymericzip ↗
- Repository
- intlayer ↗
- Licence
- Apache-2.0
- Last repository change
- 27.10.2026
Assessment and security
- Files in this package
- 21
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 4
No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
What it does and when to use it
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.
Triggers from the description
Original author 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.
How it works
- Setup
- Server-side (Astro Components)
- Framework Islands
- Bundle Optimization
- Compiler
- References
SKILL.md preview
---
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)
Files in this package (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
Versions
The database has no other skills named intlayer-astro.
Identical content appears in 1 other GitHub folders. We show one copy with the highest score.
Database snapshot: 13.11.2026 · package version 4555f5f3d27c (SHA-256 digest of the entire package)
Downloads in the last 30 days: 2 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100intlayer-vue
Integrates Intlayer internationalization with Vue.js and Nuxt applications. Use when the user asks to "setup Vue i18n", use the "useIntlayer" composable, or manage translations in Vue components. - 100intlayer-next-js
Integrates Intlayer internationalization with Next.js App Router and Pages Router. Use when the user asks to "setup Next.js i18n", use "useIntlayer" in Server Components, or handle client-side translations in Next.js. - 100astro
Astro development standards and best practices for content-driven websites Triggers on: **/*.astro, **/*.ts, **/*.js, **/*.md, **/*.mdx - 100astro
Builds Astro sites with islands, content collections, actions and server rendering. Use when editing .astro files, astro.config.mjs or src/content.config.ts, choosing client:* or server:defer, upgrading Astro, or cutting shipped JavaScript, including output mode, adapter and… - 90astro-i18n
Use when implementing i18n in Astro — locale routing strategies, getRelativeLocaleUrl/getAbsoluteLocaleUrl, Astro.currentLocale, or hreflang with sitemap. - 100astro-actions
Use when handling form submissions, mutations, or server-side logic with type safety in Astro via defineAction / astro:actions.