i18n.Function.getPersonalWeaponDescription - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki
@elite-dangerous-almanac/core / i18n / getPersonalWeaponDescription
getPersonalWeaponDescription(
symbol,locale):string|null
Defined in: src/i18n/personal-weapons.ts:42
Look up a handheld weapon's display description — the prose the game shows a player, in all six stored locales.
string
Frontier's weapon symbol, such as "wpn_s_pistol_kinetic_sauto".
Matching ignores case and surrounding whitespace.
string
A BCP 47 language or regional tag, such as "de" or "de-DE"; see
GameLocale for how a tag is matched. All six stored locales are complete for
this dataset.
string | null
The localized description, or null when the weapon is unknown or the
requested locale is not one this catalogue stores.
There is no matching name lookup, and that is not a gap. A handheld weapon's name
is a product name — "Karma P-15", "TK Aphelion" — that the game leaves in English in
every locale, so PersonalWeapon.name is the name in all six. This is display prose
and not a statement of the weapon's mechanics: it names no damage figure, rate of fire
or effective range, which are the stats PERSONAL_WEAPONS carries.
If symbol is present and not a string, or locale is not a
string. A nullish symbol is a lookup miss and returns null.
import { getPersonalWeaponDescription } from '@elite-dangerous-almanac/core/i18n/personal-weapons';
getPersonalWeaponDescription('wpn_m_sniper_plasma_charged', 'en');
// -> 'A semi-automatic, long-range plasma rifle with high damage output and a low rate of fire.'
getPersonalWeaponDescription('wpn_m_sniper_plasma_charged', 'it'); // -> null