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.