# Intlayer Angular

> Integrates Intlayer internationalization with Angular applications. Use when the user asks to "setup Angular i18n", create a new translated component, use the "useIntlayer" composable, or configure providers.

- **Type:** Skill
- **Install:** `agentstack add skill-aymericzip-intlayer-skills-intlayer-angular`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [aymericzip](https://agentstack.voostack.com/s/aymericzip)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [aymericzip](https://github.com/aymericzip)
- **Source:** https://github.com/aymericzip/intlayer-skills/tree/main/skills/intlayer-angular
- **Website:** https://intlayer.org

## Install

```sh
agentstack add skill-aymericzip-intlayer-skills-intlayer-angular
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

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

## Workflow

To create a translated component, you need two files:

1.  **Declaration:** A content file (e.g., `my-component.content.ts`) defining the dictionary.
2.  **Implementation:** An Angular component (e.g., `my-component.component.ts`) using the `useIntlayer` signal.

### 1. Declare Content

Create a content file using `t()` for translations.
**File:** `src/app/my-component/my-component.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

- [Angular](references/environment_angular.md)

### Intlayer Provider

To use Intlayer in your Angular application, you need to add the `provideIntlayer` provider to your application configuration.

```typescript
import { ApplicationConfig } from "@angular/core";
import { provideIntlayer } from "angular-intlayer";

export const appConfig: ApplicationConfig = {
  providers: [provideIntlayer()],
};
```

## useIntlayer Hook

In Angular, `useIntlayer` returns a **Signal**. You must call it as a function to access the value.

```typescript
import { Component } from "@angular/core";
import { useIntlayer } from "angular-intlayer";

@Component({
  selector: "app-my-component",
  standalone: true,
  template: `
    
      
        {{ content().text }}
      
      
    
  `,
})
export class MyComponent {
  content = useIntlayer("my-component");
}
```

## Change language

To change the language, use the `setLocale` function from the `useLocale` hook.

```typescript
import { Component } from "@angular/core";
import { useLocale } from "angular-intlayer";
import { Locales } from "intlayer";

@Component({
  selector: "app-locale-switcher",
  standalone: true,
  template: `
    
      Change Language to French
    
  `,
})
export class LocaleSwitcherComponent {
  Locales = Locales;
  private localeCtx = useLocale();
  setLocale = this.localeCtx.setLocale;
}
```

## Localized Link component

Ensure your application's navigation respects the current locale by using a localized link. You can create a component or use a helper.

```typescript
import { Component, Input } from "@angular/core";
import { RouterModule } from "@angular/router";
import { useLocale } from "angular-intlayer";
import { getLocalizedUrl } from "intlayer";

@Component({
  selector: "app-link",
  standalone: true,
  imports: [RouterModule],
  template: `
    
      
    
  `,
})
export class LinkComponent {
  @Input() href: string = "";

  private localeCtx = useLocale();
  locale = this.localeCtx.locale;

  localizedHref() {
    return this.href.startsWith("http")
      ? this.href
      : getLocalizedUrl(this.href, this.locale());
  }
}
```

## References

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

- [Angular](references/environment_angular.md)
- [Angular Intlayer Exports](references/packages_angular-intlayer_exports.md)
- [Intlayer Exports](references/packages_intlayer_exports.md)

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [aymericzip](https://github.com/aymericzip)
- **Source:** [aymericzip/intlayer-skills](https://github.com/aymericzip/intlayer-skills)
- **License:** Apache-2.0
- **Homepage:** https://intlayer.org

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-aymericzip-intlayer-skills-intlayer-angular
- Seller: https://agentstack.voostack.com/s/aymericzip
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
