<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.shroudforge.net/index.php?action=history&amp;feed=atom&amp;title=Translate_mod_text%2Fen-gb</id>
	<title>Translate mod text/en-gb - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.shroudforge.net/index.php?action=history&amp;feed=atom&amp;title=Translate_mod_text%2Fen-gb"/>
	<link rel="alternate" type="text/html" href="https://wiki.shroudforge.net/index.php?title=Translate_mod_text/en-gb&amp;action=history"/>
	<updated>2026-11-07T23:23:22Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://wiki.shroudforge.net/index.php?title=Translate_mod_text/en-gb&amp;diff=463&amp;oldid=prev</id>
		<title>FuzzyBot: Updating to match new version of source page</title>
		<link rel="alternate" type="text/html" href="https://wiki.shroudforge.net/index.php?title=Translate_mod_text/en-gb&amp;diff=463&amp;oldid=prev"/>
		<updated>2026-11-06T21:48:50Z</updated>

		<summary type="html">&lt;p&gt;Updating to match new version of source page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ShroudForge Modloader Wiki Post&lt;br /&gt;
title: Translate mod text&lt;br /&gt;
description: Translate visible Modloader text and Lua text from the same locale files in the mod folder. Read the Modloader language through shroudforge.locale(), added by PR #42.&lt;br /&gt;
language: en-GB&lt;br /&gt;
picture:ShroudForge-Wiki-modding-locales.svg&lt;br /&gt;
creator: Bonsaibauer&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:ShroudForge-Wiki-modding-locales.svg|thumb|left|600px|Translate mod text]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both;&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Translate visible Modloader text and Lua text from the same locale files in the mod folder. Read the Modloader language through &amp;lt;code&amp;gt;shroudforge.locale()&amp;lt;/code&amp;gt;, added by PR #42.&lt;br /&gt;
&lt;br /&gt;
== Locale files ==&lt;br /&gt;
&lt;br /&gt;
Add one file under &amp;lt;code&amp;gt;locales/&amp;amp;lt;code&amp;amp;gt;.json&amp;lt;/code&amp;gt; for each language. Current codes from the Modloader language selector are &amp;lt;code&amp;gt;de&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;de-AT&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;de-CH&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;en-GB&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;en-US&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;es&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;fr&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;hi&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;it&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ja&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;nl&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;pl&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;sv&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;zh&amp;lt;/code&amp;gt;. The filename matches its code exactly. These files sit beside &amp;lt;code&amp;gt;mod.json&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;extended.mod.json&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The schema is published as [https://bonsaibauer.github.io/shroudforge/schemas/mod-locale.schema.json &amp;lt;code&amp;gt;mod-locale.schema.json&amp;lt;/code&amp;gt;]. A locale catalog can translate &amp;lt;code&amp;gt;mod.name&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mod.description&amp;lt;/code&amp;gt;, setting and option labels, groups, actions, changelog lines, and Lua &amp;lt;code&amp;gt;strings&amp;lt;/code&amp;gt;. Catalogs may be partial. Entries without a translation keep their source text.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;$schema&amp;quot;: &amp;quot;https://bonsaibauer.github.io/shroudforge/schemas/mod-locale.schema.json&amp;quot;,&lt;br /&gt;
  &amp;quot;settings&amp;quot;: {&lt;br /&gt;
    &amp;quot;severity&amp;quot;: {&lt;br /&gt;
      &amp;quot;label&amp;quot;: &amp;quot;Log level&amp;quot;,&lt;br /&gt;
      &amp;quot;options&amp;quot;: { &amp;quot;info&amp;quot;: &amp;quot;Information&amp;quot;, &amp;quot;warn&amp;quot;: &amp;quot;Warning&amp;quot; }&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;groups&amp;quot;: [&lt;br /&gt;
    { &amp;quot;label&amp;quot;: &amp;quot;Logging&amp;quot;, &amp;quot;actions&amp;quot;: { &amp;quot;write&amp;quot;: { &amp;quot;label&amp;quot;: &amp;quot;Write message&amp;quot; } } }&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;strings&amp;quot;: { &amp;quot;overlay.ready&amp;quot;: &amp;quot;Ready&amp;quot; }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Setting and option keys stay the same as in &amp;lt;code&amp;gt;extended.mod.json&amp;lt;/code&amp;gt;. Group translations follow that file&amp;#039;s group order. Action translations use the existing action ID. Saved values do not change.&lt;br /&gt;
&lt;br /&gt;
== Use the same text in Lua ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local locale = shroudforge.locale()&lt;br /&gt;
local ready = shroudforge.i18n.get(&amp;quot;overlay.ready&amp;quot;, locale, &amp;quot;Ready&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;shroudforge.i18n.get(key, locale, fallback)&amp;lt;/code&amp;gt; uses the same loaded catalog as the Modloader. It checks a regional code such as &amp;lt;code&amp;gt;de-AT&amp;lt;/code&amp;gt; first, followed by its language &amp;lt;code&amp;gt;de&amp;lt;/code&amp;gt;. A missing string returns the fallback text, or the key when no fallback is provided. The lookup does not read files again. PR #42 supplies the language API, and this feature connects it to each mod&amp;#039;s catalog.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;shroudforge.locale()&amp;lt;/code&amp;gt; returns &amp;lt;code&amp;gt;en&amp;lt;/code&amp;gt; because the configuration cannot be read, catalog lookup checks &amp;lt;code&amp;gt;en-GB.json&amp;lt;/code&amp;gt; first and then &amp;lt;code&amp;gt;en.json&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;en-GB&amp;lt;/code&amp;gt; is the Modloader&amp;#039;s English default. &amp;lt;code&amp;gt;en-US&amp;lt;/code&amp;gt; remains available as an explicitly selected variant.&lt;br /&gt;
&lt;br /&gt;
Locale files do not require the runtime capability. ShroudForge interface text stays in the shared Modloader translations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:guide:Shroudforge]]&lt;/div&gt;</summary>
		<author><name>FuzzyBot</name></author>
	</entry>
</feed>