i18n.Function.getPersonalToolName - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki
@elite-dangerous-almanac/core / i18n / getPersonalToolName
getPersonalToolName(
id,locale):string|null
Defined in: src/i18n/personal-tools.ts:41
Look up a suit tool's source-backed display name for a locale.
string
The library id PersonalTool.id carries, such as "arc-cutter". 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.
string | null
The localized tool name; the canonical PersonalTool.name for any English
tag; or null when the tool is unknown or the locale is not one of the six this
catalogue stores.
All six stored locales are complete for this dataset, so a supported locale always
answers. Frontier publishes no item symbol for a tool, so the library id is the only
identifier this lookup takes — the same one getPersonalToolById takes.
A returned value can equal the English, because the game leaves some tool names untranslated. Such a value is the game's own, stored verbatim; the library never supplies an English fallback. This lookup bundles no tool stats.
If id is present and not a string, or locale is not a string. A
nullish id is a lookup miss and returns null.
import { getPersonalToolName } from '@elite-dangerous-almanac/core/i18n/personal-tools';
getPersonalToolName('energylink', 'de-DE'); // -> 'Energie-Link'
getPersonalToolName('profile-analyser', 'fr'); // -> 'Analyseur de profil'
getPersonalToolName('arc-cutter', 'it'); // -> null