Skip to main content
Version: 26.1.2 (Latest)

Lang Key Reference

Modonomicon generates the translation keys of entry research, actions and research elements from the ids you author. You only write the text. This page lists the keys of the book and the research data, so you can find or override them in a language file. The texts of the scholarship block are listed in Scholarship Lang Keys.

Texts you give in datagen as literal English are written to the language file of the book provider under the generated key. Keys you give yourself, such as withTitle("my.key"), are used as they are.

Book keys​

Book keys start with book.<book namespace>. followed by the entry path, with / replaced by ..

KeySource
book.<ns>.<entry>.nameEntry name
book.<ns>.<entry>.descriptionEntry description
book.<ns>.<entry>.<page>.title and .textPage title and text, where <page> is the page id
book.<ns>.<entry>.stage.<stage>.titleStage title, Next: title in the scholarship block
book.<ns>.<entry>.stage.<stage>.descriptionStage description, if set
book.<ns>.<entry>.stage.<stage>.action.<action>.titleTitle of an action of a stage

Example, from the notes entry of the demo book, where <ns> is modonomicon and the entry is scholarship/notes:

book.modonomicon.demo.scholarship.notes.stage.observation.title
book.modonomicon.demo.scholarship.notes.stage.observation.action.observation.title
book.modonomicon.demo.scholarship.notes.transcription_take.title

The scholarship page uses the built-in texts modonomicon.gui.scholarship.page.text unless you give your own title and text, which then use the page keys above.

Tabs use the keys returned by the entry's tabTitleKey() and tabTextKey(), see Entry Tabs.

Research keys​

Research keys follow the pattern <prefix>.<namespace>.<path>, where / in the path becomes .. The prefix names the kind of element:

PrefixUsed forExample
research_fact.Title of a fact row, when the display has no titleresearch_fact.modonomicon.demo.research.note_studied
research_value.Title of a value rowresearch_value.modonomicon.demo.insight
research_node.Name of a node in condition tooltipsresearch_node.modonomicon.demo.crafting_stick
research_stage.Name of a stage in condition tooltipsresearch_stage.modonomicon.demo.stages_demo_stage_1
research_group.Title of a research group, with .description for its descriptionresearch_group.modonomicon.items
research_toast.Toast titles and descriptionsresearch_toast.modonomicon.stick_crafted.title
tag.item.Name of an item tag in scholarship rowstag.item.minecraft.logs

The code that creates these keys is shared between datagen and runtime. In datagen, researchNodeName(ref, "Name") and researchStageName(ref, "Name") write the research_node. and research_stage. keys. ResearchProviderBase offers researchNodeDescriptionId(ref) and researchStageDescriptionId(ref) to get the keys without writing them.

A row title is looked up in this order: the display title, then the research_fact. or research_value. key, then the title of the hook, then the path of the id.

Item tags​

An item tag row is named by tag.item.<namespace>.<path>, the translation key used by NeoForge and Fabric for item tags. If the language file has no such key, the row shows #<namespace>:<path>. Add the key to show a friendlier name:

"tag.item.minecraft.logs": "Logs"

Key authoring summary​

You writeKey written
stage("id", s -> s.title("T"))book.<ns>.<entry>.stage.id.title
s.action("id", "T", ...)book.<ns>.<entry>.stage.<stage>.action.id.title
researchNodeName(node, "N")research_node.<ns>.<path>
researchStageName(stage, "N")research_stage.<ns>.<path>
group.withTitle("key")Your key, used as given
display.withTitle("key")Your key, used as given

See Display Data for the display parts and Research Groups for group keys.