languageMap Reference
Module defined in `lua/common/utils/languageMap.lua`. Maps ISO language and country codes to human-readable names. Includes Weblate translation platform codes.
Module defined in lua/common/utils/languageMap.lua. Maps ISO language and country codes to human-readable names. Includes Weblate translation platform codes.
Exports
Functions
M.resolve(key)
Resolve a language/locale code to a human-readable name. Handles Weblate codes, composite locale codes (e.g., "en_US" → "English (United States)"), and plain ISO 639-1 codes.
- Parameters:
key- string - Language/locale code (e.g., "en", "de", "en_US", "zh_Hant")
- Returns: string - Human-readable name (returns the key itself if unrecognized)
Variables
M.countries
- Type: table (string→string)
- Description: ISO 3166-1 country code to country name mapping (~250 entries)
M.languages
- Type: table (string→string)
- Description: ISO 639-1 language code to language name mapping
M.weblateCodes
- Type: table (string→string)
- Description: Weblate translation platform language codes (lowercase keys only)
Internal Notes
- ~570 lines, mostly static data tables
resolvelooks up inlanguagestable- Weblate codes may differ from standard ISO codes
interactiveShell Reference
Module defined in `lua/common/utils/interactiveShell.lua`. Interactive Lua REPL shell for runtime debugging within BeamNG.
perf Reference
Module defined in `lua/common/utils/perf.lua`. Performance profiler that tracks function execution times using debug hooks, with windowed statistics and CSV export.