6 min readCase study, Content design, Internationalization
Building Ojalá: the Arabic hiding inside Spanish
How we taught Arabic through 262 Spanish loanwords from al-Andalus, graded every etymology, generated Spanish in Arabic script by rule, and kept the Spanish on screen in an English interface.
Every Spanish speaker already says a little Arabic. Aceite is az-zayt, “the oil.” Azúcar is as-sukkar. Ojalá(“I hope so”) is the Andalusi law sha llāh, “if God should will.” Eight centuries of al-Andalus left a few thousand such words in the language. Most speakers use them every day without hearing the Arabic underneath.
Ojalá turns that into a way in. For a Spanish speaker it teaches Arabic starting from words they already know. For an Arabic speaker the same data runs the other way: a door into Spanish made of words that are secretly theirs. It is the fourth app in our Language Lab, beside Hebrabic, Cognata and Lexodus. It is also the first that crosses between the Lab's two language families.
- Loanwords
- 262
- Arabic roots
- 139
- Graded disputed
- 14
- Interface languages
- 3
Loanwords, not cousins
Hebrabic works because Hebrew and Arabic are sister languages: they share roots by descent. Spanish and Arabic do not. Spanish is a Romance language, and these words were borrowed. That distinction sounds pedantic, but it changes the product. You can't teach a “shared root.” You can teach a word's journey, and the sound changes it went through on the way.
So the honesty rules are written into the type that every entry must satisfy. A word records its Arabic source in fully vowelled script and in a fixed transliteration. Where the Andalusi Arabic form explains the Spanish shape better, the entry records that form too. It also records the word a modern Arab would actually use, the root, and whether Spanish swallowed the article al- (146 of the 262 did). When Arabic was only the bridge, a via field says where Arabic got it. Azúcar came through Persian from Sanskrit; aduana, “customs,” came from Persian; 73 entries carry a chain like that.
A grade on every word
Every entry is graded certain, probable or disputed, and a disputed entry won't validate without a note that names the rival theory. Of the 262, 216 are certain, 32 probable and 14 disputed. The disputed list is the interesting one. Hasta may be Arabic ḥattā, or it may be Latin. The story that ¡olé! comes from Allāh is popular and unproven, and the app says so. Madrid and Granada may be older names that Arabic only passed on.
The content was drafted by six parallel research passes, one per topic (home, food, trade, science, places, expressions). Each worked against the same contract. A separate review pass then went through every entry as a skeptical historical linguist would. It corrected 30, mostly sound-change explanations. For example, the Andalusi ḍ was a lateral sound that gave Spanish -ld-, which is why al-qāḍī became alcalde and aḍ-ḍabba became aldaba. Several notes had said it simply became d. The review also found a jabón example that turned out to be Latin, not Arabic, and replaced it.
Spanish, written in Arabic letters, by rule
An Arabic speaker learning Spanish needs to read the word aloud before they can read it in Latin letters. Writing 262 Arabic-script spellings by hand would have produced 262 slightly different conventions. Instead a small transcriber generates them: Castilian c before e/i and z become ث, j becomes خ, g becomes گ. Vowels are written out, a word-initial vowel sits on a hamza, and a syllable-closing consonant takes a sukūn (except on the last letter). So ojalá becomes أُوخَالَا and aceite becomes أَثِيْتِي. The data never stores these spellings, and a unit-test suite pins the rules.
Three interfaces, one dataset
The interface ships in Spanish (bare URLs), Arabic (right-to-left, under /ar) and English (under /en). The English and Arabic UI dictionaries are typed from the Spanish one, so a missing string is a compile error. Every prose field in the content (meanings, notes, example translations, letter sounds) carries all three languages, and the validator rejects an empty one.
English raised a product question that the data model alone couldn't answer. Spanish is what's being learned, so the English interface can't simply replace it. Every English note, meaning and pattern explanation is shown with the Spanish original directly beneath it, and word cards gloss in both. The letter sounds are not translations at all. The Spanish page explains ث by Castilian z in zapato; the English page explains it by the thin “think.”
The checks
- A content validator runs alongside typecheck, tests and build: Arabic fields must be in Arabic script with no word-final sukūn, transliterations must stay inside the convention, and an article before a sun letter must be assimilated (as-sukkar, never al-sukkar).
- Every root used by a word must have a meaning in all three languages, and no root meaning may go unused.
- Every letter and pattern example must point to a real word, and every via language must have an Arabic and English name.
- Every page is swept at 320 and 375px in all three languages for sideways scroll, and the build prerenders 812 static pages.
What we'd tell a client
- Name the relationship precisely. Calling these words cognates would have been friendlier and wrong, and the right word made it obvious what to show on screen: the journey.
- Generate anything that follows a rule. A transcriber with tests stays consistent across hundreds of entries, and a person typing each spelling won't.
- When you add a language, ask what the reader is there to learn. Sometimes the right translation keeps the original on screen.
- Let a reviewer who didn't write the content audit it. A second pass that only checks finds the mistakes the authors stopped seeing.
The best way into Arabic for a Spanish speaker turned out to be the Arabic they already speak. The work was being honest about which of those words really are Arabic.