Skip to content

i18n.Function.getCodexRegionName

github-actions[bot] edited this page Sep 20, 2026 · 9 revisions

@elite-dangerous-almanac/core / i18n / getCodexRegionName

Function: getCodexRegionName()

getCodexRegionName(id, locale): string | null

Defined in: src/i18n/codex-regions.ts:37

Look up a galactic codex region's source-backed display name for a locale.

Parameters

id

number

Region id, 1–42, as CodexRegion.id carries it. Id 0 means "outside the mapped region grid" and has no name.

locale

string

A BCP 47 language or regional tag, such as "de" or "de-DE"; see GameLocale for how a tag is matched.

Returns

string | null

The localized region name; the canonical CodexRegion.name for any English tag; or null when the id is not 1–42 or the locale is not one of the six this catalogue stores.

Remarks

The catalogue is keyed by region id rather than by English name, because the id is the region's stable identity while the name is the value being translated.

All six stored locales are complete, so a supported locale always answers. The game leaves many regions untranslated in some languages, and spells Izanami, Temple, Mare Somnia, Xibalba and Tenebrae alike in all six. The catalogue stores those source values verbatim rather than treating them as a missing translation.

Throws

If locale is not a string. A nullish or out-of-range id is a lookup miss and returns null.

Example

import { getCodexRegionName } from '@elite-dangerous-almanac/core/i18n/codex-regions';

getCodexRegionName(1, 'de-DE'); // -> 'Galaktisches Zentrum'
getCodexRegionName(5, 'fr'); // -> 'Bras de la Règle'
getCodexRegionName(5, 'it'); // -> null

TypeScript

Guides
astro
Classes (1)
ProceduralSystem

Properties

Accessors

Methods

Interfaces (28)
Type Aliases (6)
Variables (22)
Functions (57)
Subpath modules (3)
commodities
Interfaces (1)
Type Aliases (1)
Variables (3)
Functions (3)
equipment
Interfaces (18)
Type Aliases (9)
Variables (4)
Functions (14)
Subpath modules (2)
galaxy-map
Interfaces (1)
Variables (1)
Functions (2)
i18n
Interfaces (1)
Type Aliases (1)
Functions (23)
materials
Enumerations (2)
Interfaces (2)
Type Aliases (2)
Variables (9)
Functions (9)
ships
Classes (3)
BuildMetrics

Methods

LoadoutEditError

Constructors

Properties

Methods

ShipLoadout

Accessors

Methods

Interfaces (125)
Type Aliases (44)
Variables (10)
Functions (86)
Subpath modules (8)

Clone this wiki locally