mapbox / mapbox/mapbox-agent-skills

Add skill: mapbox-internationalization-patterns

Open
#54 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
78
Forks
17
Avg merge
4h 39m
Merged PRs (30d)
3

Description

Summary

Mapbox has specific support for internationalized maps - RTL text, non-Latin scripts, locale-aware label ordering - but AI assistants don't know the correct configuration. Developers building maps for global audiences frequently get this wrong.

Topics to cover

  • RTL text - mapbox-gl-rtl-text plugin setup, when it's required, common initialization errors
  • Non-Latin scripts - CJK, Arabic, Hebrew, Devanagari label rendering and font requirements
  • Language switching - using setLayoutProperty to swap label language dynamically
  • Locale-aware label ordering - text-field expressions for multilingual labels
  • Font stacks - Mapbox font glyphs for non-Latin scripts, fallback fonts
  • Right-to-left UI - integrating an RTL map in an RTL web/mobile layout

Key patterns a skill should teach

  • Correct RTL plugin initialization order (must load before map)
  • The ['coalesce', ['get', 'name_en'], ['get', 'name']] pattern for language fallback
  • How to set the map's display language to match the user's locale
  • Common mistakes: forgetting the RTL plugin, using name fields that don't exist in all regions

Why this matters

Maps for global products are common. Without guidance, AI assistants skip RTL plugin setup entirely or use name fields that don't exist for all regions.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No target file, test, or entry point is named; first locate how existing skills are structured in the repository and identify the corresponding skill content location. Done means documenting the listed RTL, script, language-switching, label-ordering, font, and locale integration patterns, including the stated fallback and common mistakes.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation, internationalization
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.