The package folder
my-book/
book.json manifest (required)
cover.png cover, 2:3 portrait, 1024×1536 px recommended (required)
sections/ or lessons/: section files named in book.json
intro.json
lesson-1.json
audio/ mp3 clips named by the sections
images/ png / jpg / webp named by the sections
strokes/ stroke data for writing blocks (only books that teach writing)
lexicon.json word senses (only books with passage blocks)
Folder names other than strokes/ are free: a path in a section is all the reader follows.
Keep every path relative, with forward slashes and no ... Use lower-case file names without
spaces.
Shared value types
| Name | Shape | Notes |
|---|---|---|
| Localized | {"en": "Hello", "zh-Hans": "你好", "zh-Hant": "你好", "fr": "Bonjour"} |
Base-language text. Keys are locale codes; must include the book’s language.base. The reader shows the user’s language when present, else the base. Recognized keys today: en, fr, zh-Hans, zh-Hant. |
| Target text | "fa": "سلام" |
Text in the language being taught. The field is called fa in every book, whatever the language (the format began with Farsi). |
| pron | "pron": "salām" |
Romanization or reading guide for the target text. Optional, but expected for beginners. |
| gloss | Localized | The meaning of target text in the base language. |
| audio | "audio": "audio/l1/salam.mp3" |
Path to an mp3 in the package. Optional everywhere it appears, except where an exercise needs it. |
| Sentence item | {"fa", "pron"?, "gloss", "audio"?, "speaker"?, "speakerTarget"?} |
One line of target text. Used by sentences, phraseList, practiceWords, readLadder and others. |
| id | string | Every block has an id, unique within its section file. Ids are used for bookmarks, search, progress and review; keep them stable between versions of a book. |