Expand description
Keyword locale tables — multi-lingual keyword views (T37).
VibeScript keywords are canonically English. This module provides locale tables that map keywords from other languages to the canonical English forms. The parser accepts any locale’s keyword and normalises it to the canonical English form.
§Design
Localeidentifies a language locale (e.g.en,zh).LocaleTablemaps locale-specific keywords to canonical forms.LocaleRegistryholds tables for all supported locales.- The parser can use
LocaleRegistry::resolveto check if a token is a keyword in any locale and get the canonical form.
§Ship en plus one second locale as proof of pipeline
English (en) is the canonical locale. Chinese (zh) is shipped
as the second locale to prove the pipeline works. Adding more
locales is a matter of adding more tables.
Reference: docs/vibescript-full-impl-PLAN.md §8.8 T37.
Structs§
- Locale
- A language locale identifier (e.g. “en”, “zh”).
- Locale
Registry - A registry of locale tables.
- Locale
Table - A keyword locale table — maps locale-specific keywords to canonical English forms.
Constants§
- ENGLISH_
KEYWORDS - The canonical English keyword list.
Functions§
- arabic_
table - The Arabic locale table.
- chinese_
table - The Chinese locale table.
- english_
table - The English locale table (canonical — keywords map to themselves).
- french_
table - The French locale table.
- german_
table - The German locale table.
- hindi_
table - The Hindi locale table.
- japanese_
table - The Japanese locale table.
- spanish_
table - The Spanish locale table.