Skip to main content

parseLang

Parse a Minecraft .lang file into a key→value map. Lines starting with # are comments; blank lines are skipped. Format: key=value (value may contain '=').

Import​

import { parseLang } from '@bedrock-core/builder-i18n';

Signature​

function parseLang(content: string): Record<string, string>;

Parameters​

ParameterTypeDefaultDescription
contentstring—Language-file source text

Returns​

Language keys mapped to parsed string values.

Usage​

import { parseLang } from '@bedrock-core/builder-i18n';

const values = parseLang('example.title=Example\n');