i18n.Function.getPreEngineeredVariantName - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki
@elite-dangerous-almanac/core / i18n / getPreEngineeredVariantName
getPreEngineeredVariantName(
variant,locale):string|null
Defined in: src/i18n/pre-engineered.ts:65
Look up the display name of one pre-engineered module variant.
The variant's stable catalogue identity. All four dimensions are used because a base module and blueprint alone do not uniquely identify every reward.
string
A BCP 47 locale. Regional tags fall back to their supported language.
string | null
The explicit localized name, or null for an unknown variant or unavailable
translation. Decorative reward names have English values only.
If variant is not an object, a required identity field or a
non-null experimentalEffectSymbol value is not a string, or locale is not a
string.
import { getPreEngineeredVariantName } from '@elite-dangerous-almanac/core/i18n/pre-engineered';
getPreEngineeredVariantName({
symbol: 'Hpt_FlakMortar_Turret_Medium',
blueprintSymbol: 'Decorative_Red',
acquisition: 'eventReward',
}, 'en'); // -> 'Festive Red Remote Release Flak Launcher'