i18n.Function.getExperimentalEffectDescription - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki
@elite-dangerous-almanac/core / i18n / getExperimentalEffectDescription
getExperimentalEffectDescription(
experimentalEffectSymbol,locale):string|null
Defined in: src/i18n/experimental-effect-descriptions.ts:43
Look up an experimental effect's display description — the prose the game shows a player, in all six stored locales.
string
Frontier's experimental-effect id. Matching ignores case and surrounding whitespace.
string
A BCP 47 locale. All six stored locales are complete for this dataset.
string | null
The localized description, or null when the effect is unknown or the
requested locale is not one this catalogue stores.
This is display text, not a statement of the effect's mechanics. An effect's
description in the ships/experimental-effects catalogue answers the other
question — it names the damage split or behaviour the modifiers list cannot
express — and the two are deliberately not the same string.
This is a heavy i18n dataset: six locales of prose for every effect is ~129 KiB
minified (~25 KiB gzipped), more than module names cost. It has its own module so an
application that never shows an effect description does not pay for it — import it
from core/i18n/experimental-effect-descriptions rather than the core/i18n barrel
if you want that boundary to be explicit.
If a present experimentalEffectSymbol or locale is not a string.
import { getExperimentalEffectDescription } from '@elite-dangerous-almanac/core/i18n/experimental-effect-descriptions';
getExperimentalEffectDescription('special_auto_loader', 'en');
// -> 'An experimental upgrade that automatically reloads the weapon, even when firing.'
getExperimentalEffectDescription('special_auto_loader', 'it'); // -> null