Getting Started

LokaScript adds multilingual support to
hyperfixi — letting you write
hyperscript in 24 languages with natural grammar transformation.

What is LokaScript?

LokaScript is a set of packages that bring internationalization
to the hyperfixi hyperscript runtime:

  • @lokascript/i18n — Grammar transformation and keyword
    translation between 24 languages
  • @lokascript/semantic — AI-friendly multilingual parser
    with confidence scoring
  • @lokascript/hyperscript-adapter — Drop-in multilingual
    plugin for original _hyperscript

Quick Example

The same logic, expressed naturally in different languages:

-- English (SVO)
on click toggle .active on me

-- Japanese (SOV)
クリック で 私 の .active を 切り替え

-- Spanish (SVO)
al hacer clic alternar .active en mi

-- Arabic (VSO)
عند النقر بدّل .active على نفسي

Key Features

  • 24 Languages: Write in your native language with natural
    grammar transformation
  • 3 Grammar Types: SVO, SOV, and VSO word order support
  • Code Translation: Translate hyperscript between languages
    programmatically
  • Semantic Parser: AI-friendly parsing across all supported
    languages
  • Adapter Plugin: Add multilingual support to existing
    _hyperscript projects without migration

Language Bundle Selection

The i18n package is primarily for documentation and code
translation. Choose what you need:

For code translation

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

const japanese = translate(
  'on click toggle .active on me',
  'en', 'ja'
);

For semantic parsing

npm install @hyperfixi/core @lokascript/semantic

For existing _hyperscript projects

<script src="https://unpkg.com/hyperscript.org"></script>
<script src="https://unpkg.com/@lokascript/hyperscript-adapter">
</script>

Next Steps

  1. Patterns — Browse 114 patterns in 24 languages
  2. Adapter Plugin — Add multilingual
    support to _hyperscript
  3. hyperfixi Guide
    Core hyperscript getting started