Installation

LokaScript adds multilingual support to
hyperfixi. Choose the package
that matches your use case.

For Code Translation & i18n

Translate hyperscript code between 24 languages programmatically:

npm install @hyperfixi/core @lokascript/i18n
import { hyperscript } from '@hyperfixi/core';
import { translate, getSupportedLanguages } from '@lokascript/i18n';

// Translate code between languages
const japanese = translate('on click toggle .active on me', 'en', 'ja');
// → 'クリック で 私 の .active を 切り替え'

// Get all supported languages
const langs = getSupportedLanguages();
// ['en', 'es', 'pt', 'fr', 'de', 'ja', 'zh', 'ko', 'ar', ...]

For Semantic Parsing

AI-friendly multilingual parser with confidence scoring:

npm install @hyperfixi/core @lokascript/semantic
import { parse, detect } from '@lokascript/semantic';

const result = parse('on click toggle .active on me', {
  language: 'en',
  confidenceThreshold: 0.7
});

console.log(result.confidence); // 0.98
console.log(result.ast);        // Parsed AST

For Existing _hyperscript Projects

Add multilingual support to projects already using the original
_hyperscript — no migration required:

<script src="https://unpkg.com/hyperscript.org"></script>
<script src="https://unpkg.com/@lokascript/hyperscript-adapter/dist/hyperscript-i18n-es.global.js"></script>

<button _="on click alternar .active" data-lang="es">
  Haz clic
</button>

See the adapter plugin guide for bundle
options and live demos.

Installing hyperfixi (Core Runtime)

LokaScript packages require the hyperfixi runtime. If you haven't
installed it yet, see the
hyperfixi installation guide.

Next Steps