Write fixi-family attributes in your own language — fx-action → fx-acción / fx-アクション, live, on-click, fx-ignore and friends — across 24 locales, resolved at processing time.
Names resolve at processing time through small per-library hooks — no preprocessor, no DOM mutation, and the attribute you wrote is the attribute devtools shows.
<!DOCTYPE html>
<html lang="es">
<head>
<script src="./loka.js"></script> <!-- defines window.loka, installs the localization hooks -->
<script src="./locales/es.js"></script> <!-- registers Spanish vocabulary -->
<script src="./fixi.js"></script> <!-- the fixi library, now localization-aware -->
</head>
<body>
<button fx-acción="/api" fx-disparador="clic" fx-objetivo="#out">Cargar</button>
<div id="out"></div>
</body>
</html>
Three things to notice:
fx-acción.fx-acción — the attribute is never rewritten.#out correctly.This page declares <html lang="en">, but each section below sets its own lang. Every section's fixi attributes resolve against its own language — Spanish in the Spanish section, Japanese in the Japanese section, English at the top level. Click the buttons; each loads a fragment through its localized fx-* attributes.
Open full demos in a new tab: per-element language · all five libraries on one Spanish page
fx-acción, al-clic, fx-intercambio="morfar" stay verbatim in the DOM. Devtools shows exactly what you authored — the libraries resolve the canonical name through hooks at read time, not by mutating your markup.
Language is resolved via the nearest lang ancestor, so one page can mix <section lang="es"> and <section lang="ja"> and each resolves its own vocabulary. A preprocessor would have to commit to one language up front.
loka ships lightly-patched copies (~30–150 bytes each) that are bit-identical to upstream when no locale is loaded. The patches do nothing until a locale registers, so they re-port cleanly against upstream changes.
loka-js and LokaScript draw their event and action words from the same @lokascript/semantic vocabulary source. A "click" is clic in both worlds, so a Spanish-speaking developer moving between rich hyperscript-style behaviors and minimal fixi-family hypermedia doesn't relearn DOM-event names.
The multilingual layer for hyperscript — write rich behaviors like al hacer clic alternar .active en mi in 24 languages. Reach for it when you're writing client-side behavior.
The same idea applied to the fixi family — write minimal hypermedia attributes (fx-acción, fx-objetivo, …) in those same 24 languages. Reach for it when you're writing HTTP-attribute hypermedia. The two compose on one page without conflict.
0BSD-licensed. 24 locales; es, ja, and ar are native-speaker reviewed for fixi attributes.