weegloo-default-locale

Explains locale bucket semantics for Weegloo Content reads and writes across CMA and CDA APIs.

1|2|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/weeglooapi/weegloo-mcp-plugin --skill weegloo-default-locale-weeglooapi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: weegloo-default-locale
Source: https://github.com/weeglooapi/weegloo-mcp-plugin/tree/main/plugins/weegloo/skills/weegloo-default-locale
Command: npx skills add https://github.com/weeglooapi/weegloo-mcp-plugin --skill weegloo-default-locale-weeglooapi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Localized content in Weegloo behaves differently on the management plane (CMA/ACMA) versus the delivery plane (CDA/ACDA), causing the common bug where fields.x[locale] returns undefined on delivery reads. This Skill clarifies default-locale requirements on create, fallbackCode chains on read, and the locale URL parameter shapes so you stop guessing which response shape to expect. ## Core Features & Use Cases - Write rules for localized fields: Explains that required localized fields need values under every non-optional locale, and that localized: false fields live only in the default-locale bucket. - Read shape by API plane: Documents that CMA/ACMA always return per-locale buckets while CDA/ACDA flatten to scalars unless locale=* is passed, for both list and detail endpoints. - Fallback and include expansion: Covers per-locale fallbackCode chains (no automatic fallback to default) and how expanded Media under the include object follows the same flattening rules. - Use Case: When a CDA detail fetch returns fields.prompt as a plain string and your code does fields.prompt["en-US"], use this Skill to diagnose the undefined result and fix the accessor for the correct plane. ## Quick Start Ask the agent to explain why a Weegloo CDA content read returns undefined when indexing fields by locale code and how to fix the field access.

Frequently Asked Questions about weegloo-default-locale

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

FAQPage Schema
Why does fields.x[locale] return undefined on a Weegloo CDA read?

Delivery APIs (CDA/ACDA) flatten fields to a scalar by default, so the value is at fields.x directly, not fields.x[locale]. Per-locale buckets only appear on management (CMA/ACMA) responses or when you pass locale=* on a delivery read.

How do I create localized Content in Weegloo without errors?

Every field value must be a per-locale map, and required localized fields must include values under every non-optional locale, which always includes the space default. A bare scalar value is rejected with CORE422007, and a missing default bucket on a required field fails with WGL400006.

What is the difference between localized true and false on a ContentType field?

localized: true stores a per-locale map with the default locale mandatory when populated. localized: false stores a single value under the default-locale bucket only, suited for locale-independent data like IDs, SKUs, or one global Media reference.

Does Weegloo fall back to the default locale when a translation is missing?

No. Reads follow the requested locale's own fallbackCode chain, and if that locale has no fallbackCode the value stays empty. The default locale has no special privilege on reads; fallback only matters for what readers see, never for relaxing write requirements.

What does the locale query parameter do on CDA and ACDA endpoints?

Omitting it returns flat scalars in the space default locale, locale={code} returns flat scalars for that locale with its fallback chain applied, and locale=* returns per-locale maps with no fallback. The behavior is identical for list and single-content detail reads on both CDA and ACDA.