fluent-core-langneg

Implements Fluent Langneg negotiateLanguages() for locale fallback and BCP47 handling.

1|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/OpenAEC-Foundation/Fluent-i18n-Claude-Skill-Package --skill fluent-core-langneg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fluent-core-langneg
Source: https://github.com/OpenAEC-Foundation/Fluent-i18n-Claude-Skill-Package/tree/main/skills/source/fluent-core/fluent-core-langneg
Command: npx skills add https://github.com/OpenAEC-Foundation/Fluent-i18n-Claude-Skill-Package --skill fluent-core-langneg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Implement language negotiation and robust locale fallback for multilingual applications using Fluent Langneg, preventing incorrect strategy choices and broken user experiences.

Core Features & Use Cases

  • Supports negotiateLanguages() strategies: filtering, matching, and lookup to build suitable locale orders.
  • Parses and applies BCP 47 locale handling via acceptedLanguages() and subtag matching for precise fallbacks.
  • Provides a complete workflow for client-side and server-side localization, including fallback chains and error handling in edge cases.

Quick Start

Run negotiateLanguages with your user's preferred locales and your app's available locales to obtain a negotiated locale order.

Frequently Asked Questions about fluent-core-langneg

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement language negotiation for multilingual app localization?

Language negotiation matches user preferred locales against available app locales using strategies like filtering, matching, and lookup to build a suitable negotiated locale order. It ensures users receive content in the best matching language.

How does acceptedLanguages parse HTTP headers for BCP47 locale fallback?

acceptedLanguages parses HTTP Accept-Language headers to extract and apply BCP47 locale tags. It uses subtag matching to construct precise fallback chains for server-side localization contexts.

What is the difference between filtering, matching, and lookup strategies in negotiateLanguages?

Filtering returns all matching locales, matching finds the best specific fits, and lookup selects a single default locale when exact matches fail. These strategies dictate how locale fallback orders are constructed.

Can I use Fluent Langneg for both client-side and server-side locale fallback chains?

Yes, it provides a complete workflow for both client-side and server-side localization. It constructs consistent fallback chains and handles edge cases with strict input validation across both contexts.

Why do I need a defaultLocale when using the lookup strategy for locale negotiation?

The lookup strategy requires a defaultLocale to guarantee a valid return value when no user preferred locales match the available app locales. It ensures the application always resolves to a functional language.

What are the limitations of relying on BCP47 subtag matching for locale fallbacks?

BCP47 subtag matching constructs precise fallbacks but may hit edge cases requiring strict input validation. It relies on consistent API behavior to prevent incorrect strategy choices and broken user experiences.