paraglide-js

Use when adding or modifying Paraglide JS internationalization, locale detection strategies, localized routing, or generated message usage in Vite, SSR, TanStack Start, or monorepo setups.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "paraglide-js" with this command: npx skills add zhuojg/agent-skills/zhuojg-agent-skills-paraglide-js

Paraglide JS

Overview

Paraglide JS is a compiler-based i18n library that generates typed message functions and runtime helpers. Use this skill when a project needs Paraglide setup, message usage, locale detection, SSR integration, or refactoring around generated paraglide/ output.

When To Use

  • Adding Paraglide JS to a new or existing app
  • Updating locale strategy order or custom strategies
  • Wiring SSR locale detection with paraglideMiddleware()
  • Integrating Paraglide into TanStack Start
  • Reusing one project.inlang across a monorepo

Do not use this skill for generic copywriting or translation quality review. It is for code integration and runtime behavior.

Core Workflow

  1. Identify the app shape: Vite app, SSR app, TanStack Start app, or monorepo.
  2. Prefer the Vite plugin for Vite-based apps.
  3. Use CLI compilation when bundler integration is unavailable or when a package needs explicit compile scripts.
  4. Add server middleware only for SSR/server request flows.
  5. Keep project.inlang and message files as the source of truth; treat generated paraglide/ output as build artifacts.
  6. Recompile after changing messages, locales, strategy, or output settings.

Rules Of Thumb

  • Prefer paraglideVitePlugin() in Vite projects instead of hand-rolling generated output.
  • Prefer built-in strategies before adding custom ones.
  • Order strategies intentionally. Earlier strategies win.
  • Use one owner for URL rewriting. Do not combine router-level URL rewrites and middleware-driven URL localization without checking for redirect loops.
  • In monorepos, default to "each package compiles" unless every consumer can share one identical strategy/runtime.

Reference Guide

Common Mistakes

  • Editing generated src/paraglide/* files directly instead of changing source messages or config
  • Forgetting to recompile after changing messages/*.json or project.inlang/settings.json
  • Adding paraglideMiddleware() to client-only SPAs
  • Putting a preference strategy before url without expecting redirect behavior
  • Using TanStack Router rewrites and URL-based middleware localization together without testing for loops

External Sources

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

vercel-composition-patterns

React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.

Repository Source
86.4K23Kvercel
Automation

vercel-react-native-skills

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

Repository Source
60.7K23Kvercel
Automation

supabase-postgres-best-practices

Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.

Repository Source
35.3K1.6Ksupabase
Automation

sleek-design-mobile-apps

Use when the user wants to design a mobile app, create screens, build UI, or interact with their Sleek projects. Covers high-level requests ("design an app that does X") and specific ones ("list my projects", "create a new project", "screenshot that screen").

Repository Source