Join Nostr
2025-10-21 21:48:43 UTC

Thomas Steiner :chrome: on Nostr: Interesting DOM localization proposal by Mozilla: . In your HTML: `<link ...

Interesting DOM localization proposal by Mozilla: https://github.com/mozilla/explainers/blob/main/dom-localization.md.

In your HTML:

`<link rel="localization" src="resource.mf" />`

In the `resource.mf` file:

`greeting = Welcome, {$userName}.`

In your: HTML:

`<h1 l10n-id="greeting" l10n-args="userName: John"></h1>`

Rendered DOM:

`<h1 l10n-id="greeting" l10n-args="userName: John">Welcome, John</h1>`