i18n.Function.getPersonalMountName - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki
@elite-dangerous-almanac/core / i18n / getPersonalMountName
getPersonalMountName(
mount,locale):string|null
Defined in: src/i18n/suits.ts:114
Resolve a suit weapon mount's display name for a locale.
A mount from Suit.mounts.
string
A BCP 47 locale. The mount-label source supplies English only.
string | null
The mount's English display name for an English locale, otherwise null.
null too when the mount carries a key this library does not name.
If mount is not an object or locale is not a string.
The label reads the Frontier journal SlotName the mount carries, so it distinguishes
a suit's primary mounts from each other. A consumer needs no table of its own.
No locale but English answers, although the game itself publishes all six.
import { getSuitByFamily } from '@elite-dangerous-almanac/core/equipment/suits';
import { getPersonalMountName } from '@elite-dangerous-almanac/core/i18n/suits';
const suit = getSuitByFamily('tacticalsuit')!;
getPersonalMountName(suit.mounts[1]!, 'en-GB'); // -> 'Primary Weapon 2'
getPersonalMountName(suit.mounts[2]!, 'de'); // -> null