home / skills / oimiragieo / agent-studio / paraglide-js-internationalization-i18n

paraglide-js-internationalization-i18n skill

/.claude/skills/_archive/dead/paraglide-js-internationalization-i18n

This skill helps ensure Paraglide.js i18n compliance by reviewing code, suggesting best practices, and explaining translations via t function.

npx playbooks add skill oimiragieo/agent-studio --skill paraglide-js-internationalization-i18n

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
1.8 KB
---
name: paraglide-js-internationalization-i18n
description: Details Paraglide.js i18n implementations.
version: 1.0.0
model: sonnet
invoked_by: both
user_invocable: true
tools: [Read, Write, Edit]
globs: '**/*.svelte'
best_practices:
  - Follow the guidelines consistently
  - Apply rules during code review
  - Use as reference when writing new code
error_handling: graceful
streaming: supported
---

# Paraglide Js Internationalization I18n Skill

<identity>
You are a coding standards expert specializing in paraglide js internationalization i18n.
You help developers write better code by applying established guidelines and best practices.
</identity>

<capabilities>
- Review code for guideline compliance
- Suggest improvements based on best practices
- Explain why certain patterns are preferred
- Help refactor code to meet standards
</capabilities>

<instructions>
When reviewing or writing code, apply these guidelines:

- Use Paraglide.js for internationalization: https://inlang.com/m/gerre34r/library-inlang-paraglideJs
- Install Paraglide.js: `npm install @inlang/paraglide-js`
- Set up language files in the `languages` directory.
- Use the `t` function to translate strings:
  svelte
  <br />
  import { t } from '@inlang/paraglide-js';
  <br />
  - Support multiple languages and RTL layouts.
    </instructions>

<examples>
Example usage:
```
User: "Review this code for paraglide js internationalization i18n compliance"
Agent: [Analyzes code against guidelines and provides specific feedback]
```
</examples>

## Memory Protocol (MANDATORY)

**Before starting:**

```bash
cat .claude/context/memory/learnings.md
```

**After completing:** Record any new patterns or exceptions discovered.

> ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.

Overview

This skill helps developers apply Paraglide.js internationalization (i18n) best practices in JavaScript projects. It reviews code, suggests concrete improvements, and provides clear guidance for setting up language files, translations, and RTL support. Use it to ensure translations are consistent, maintainable, and integrated correctly with Svelte or other front-end frameworks.

How this skill works

The skill inspects project structure, language file placement, and use of the t function from @inlang/paraglide-js. It checks for missing or duplicate keys, inconsistent placeholder usage, and whether RTL locales are handled correctly. It provides refactoring suggestions, code snippets, and rationale for preferred patterns to improve clarity and scalability.

When to use it

  • Onboarding i18n to a new or existing JS/Svelte project
  • Reviewing translation coverage and detecting missing keys
  • Enforcing consistent placeholder and pluralization patterns
  • Preparing UI for RTL languages and layout adjustments
  • Auditing third-party components for i18n compatibility

Best practices

  • Install and import Paraglide.js via npm and centralize setup: npm install @inlang/paraglide-js and a single i18n entry point
  • Keep language JSON/files in a languages directory with one file per locale and consistent key structure
  • Always use the t function for runtime translations and avoid inline hardcoded strings in templates
  • Standardize placeholder names and include examples in base locale to guide translators
  • Test and design for RTL early: mirror layout styles, confirm text direction, and validate punctuation/spacing

Example use cases

  • Code review that flags hardcoded strings and replaces them with t('key') calls
  • Refactor templates to unify placeholder usage and extract pluralization logic
  • Create or validate languages/<locale>.json files and detect missing translations across locales
  • Advice on implementing RTL support: set dir attribute and swap layout styles where necessary
  • Provide migration steps for projects using multiple ad hoc i18n methods to consolidate on Paraglide.js

FAQ

Does this skill modify code automatically?

It provides precise code suggestions and refactor examples; integrate changes manually or apply them with your preferred tooling.

How does it handle pluralization and placeholders?

It recommends using consistent placeholder names and Paraglide.js-supported pluralization patterns; it flags mismatches and suggests canonical forms.

Can it validate RTL layouts?

Yes. It reviews direction attributes, CSS that depends on LTR assumptions, and recommends swaps or logical properties to support RTL.