Persona A — Commerce Platform Developer
Scenario
You run an e-commerce platform serving Brazil, Japan, and Germany. Your search is broken cross-border: a Brazilian customer searching tênisdoesn't match your German Schuheinventory. You've been hand-rolling per-locale keyword tables for 2 years.
What mogan-i18n replaces
- Per-locale keyword → category mapping tables (manual maintenance)
- Ad-hoc DeepL/Google Translate calls per search query (cost + latency)
- Brittle string-matching across product titles in different languages
Working code (Python + Node)
# Python — replace your ad-hoc translation pipeline
import requests
def search_cross_border(user_query: str, user_locale: str) -> list:
r = requests.get(
"https://api.mogan-i18n.com/v1/lookup",
params={"keyword": user_query, "locale": user_locale},
headers={"x-api-key": "your_key"}
)
r.raise_for_status()
canonical = r.json()["canonical_slug"]
# Now query your inventory by canonical, not by locale-specific text
return inventory.query(canonical_category=canonical)Expected behavior
Sub-5ms p50 latency. Falls back gracefully on miss (returns 404, your code can offer dict-grow opt-in or default to fuzzy match). All 9 production-ready languages identical contract.
Tiering & cost
Phase 1: free tier 1K req/day. Phase 2: usage-based pricing TBD per spec §pricing.
Full source: /use-cases.md §Persona A (verbatim from spec, lines 11-103)