惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
博客园 - 司徒正美
I
InfoQ
宝玉的分享
宝玉的分享
G
Google Developers Blog
J
Java Code Geeks
Martin Fowler
Martin Fowler
The GitHub Blog
The GitHub Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
罗磊的独立博客
腾讯CDC
F
Fortinet All Blogs
A
About on SuperTechFans
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Recent Announcements
Recent Announcements
Last Week in AI
Last Week in AI
B
Blog RSS Feed
博客园 - 聂微东
D
DataBreaches.Net
Hugging Face - Blog
Hugging Face - Blog
The Cloudflare Blog
L
LangChain Blog
Microsoft Azure Blog
Microsoft Azure Blog
aimingoo的专栏
aimingoo的专栏

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
GitHub - ws-rush/lingui-rr: React Router v8 framework-mod...
ws-rush · 2026-06-28 · via Hacker News: Show HN

React Router v8 framework-mode integration for Lingui.

Stand With Palestine Documentation npm version


lingui-rr is a specialized integration layer that bridges Lingui and React Router v8 (Framework Mode). It handles the complexities of internationalization (i18n), locale routing, detection, and state serialization with zero-friction types.

For complete documentation, guides, and API reference, visit lingui-rr.wusaby.com.

Key Features

  • 🌐 URL-Prefix & Context Modes: Route locales seamlessly via URL paths (e.g., /en/about vs /about with prefix hiding) or keep URLs clean using cookie/header detection.
  • Zero-Cast React Integration: Prevents React Router type widening, avoiding messy as LinguiState assertions on loader data.
  • 🔄 SSR & SPA Support: Optimizations and configurations for Server-Side Rendered (server: true) and client-only Single Page Apps (server: false).
  • 🛡️ Built-in Redirection & Fallbacks: Automatic validation of locale prefixes with regional fallbacks (e.g. en-US -> en and ar-PS -> ar) and unlocalized asset exclusion.
  • ⚙️ Pluggable Pipelines: Customizable detector and persistence flows (Cookies, Headers, Session Storage, localStorage, Navigator).

Installation

pnpm add lingui-rr @lingui/core @lingui/react
pnpm add -D @lingui/cli @lingui/conf @lingui/vite-plugin @lingui/format-po

Quick Preview

Define your router setup in a shared i18n file, including regional variations like Palestinian Arabic (ar-PS):

// app/lib/i18n.ts
import {
  createLinguiRouter,
  clientDetectors,
  clientPersistence,
} from 'lingui-rr'

export const i18n = createLinguiRouter({
  server: false,
  mode: 'url-prefix',
  defaultLocale: 'ar',
  locales: {
    ar: { label: 'العربية', dir: 'rtl' },
    'ar-PS': { label: 'العربية (فلسطين)', dir: 'rtl' },
    en: { label: 'English', dir: 'ltr' },
  },
  detection: [clientDetectors.cookie('locale'), clientDetectors.navigator()],
  persistence: [clientPersistence.cookie('locale')],
  catalogs: {
    ar: () => import('../locales/ar.po'),
    'ar-PS': () => import('../locales/ar.po'),
    en: () => import('../locales/en.po'),
  },
})

Integrate into app/root.tsx:

// app/root.tsx
import {
  createLinguiRootLoader,
  createLinguiClientMiddleware,
  LinguiRouterProvider,
} from 'lingui-rr'
import { Outlet, useLoaderData } from 'react-router'
import { i18n } from './lib/i18n'

export const clientMiddleware = [createLinguiClientMiddleware(i18n)]
export const clientLoader = createLinguiRootLoader(i18n)

export default function App() {
  const state = useLoaderData<typeof clientLoader>()
  return (
    <LinguiRouterProvider state={state}>
      <Outlet />
    </LinguiRouterProvider>
  )
}

Documentation

Full documentation is hosted at lingui-rr.wusaby.com. Please refer to the site for:

  • Getting Started & Concept Mental Model: Understand the middleware-loader-provider lifecycle.
  • Step-by-Step Tutorials:
    • SSR with URL Prefixes
    • Client-Only/SPA with URL Prefixes
    • SSR in Context Mode (unprefixed URLs)
    • Client-Only/SPA in Context Mode
  • Configuration Reference: Complete options for createLinguiRouter including ignored paths, fallback behaviors, and regional fallbacks.
  • API Reference: Detailed specifications for middleware factories, loaders, hooks (useLinguiRouter), actions (createLocaleAction), and path rewriting helpers (rewriteLocalePath).
  • Advanced Options & Integration: Custom cookie attributes, session persistence using React Router's SessionStorage, and catalog compiler formats.

Support Palestine 🇵🇸

We stand in solidarity with the people of Palestine. We condemn the ongoing genocide, military occupation, and humanitarian catastrophe. Learn more and find resources documenting the situation at stand-with-palestine.org and the names of the victims at visualizingpalestine.org.