Back to Gallery

Multilingual Hyperscript

Write hyperscript in your native language

Select Language / 选择语言 / 言語を選択

🔢 Counter Example

🇺🇸 English (Reference)
on click increment #count
🇺🇸 English
on click increment #count

Try It

0

🎭 Toggle Example

🇺🇸 English (Reference)
on click toggle .active
🇺🇸 English
on click toggle .active

Try It - Click the Box

Click Me!

🪞 Input Mirror Example

🇺🇸 English (Reference)
on input put my value into #output
🇺🇸 English
on input put my value into #output

Try It - Type Below

Your text will appear here...

🧠 Live Grammar Transformation

Beyond word-by-word translation, LokaScript adapts code to natural grammar patterns. SOV languages (Japanese, Korean) reorder elements; VSO languages (Arabic) place verbs first. Try the demo below.

SVO (Subject-Verb-Object)

English, Chinese, Spanish, Indonesian, Swahili

SOV (Subject-Object-Verb)

Japanese, Korean, Turkish, Quechua

VSO (Verb-Subject-Object)

Arabic (also RTL text direction)

Semantic Roles: The grammar system identifies universal semantic roles (action, patient, event, destination) and reorders them according to each language's natural word order. Grammatical markers (particles, prepositions) are inserted appropriately.
How it works: LokaScript's i18n module goes beyond simple keyword translation. It uses a grammar transformation system that understands semantic roles (action, patient, event, destination) and reorders them according to each language's natural word order. SOV languages like Japanese place the object before the verb (#count を 増加), VSO languages like Arabic place the verb first (زِد #count), and Chinese uses circumfix patterns (当 点击 时). Grammatical markers (particles, prepositions, case suffixes) are inserted appropriately for each language family.