Hello Aquaria Community,<br><br>  here is a patch set that enables multi-language support in Aquaria. Setting the desired language to use is done using the config file with a new element &quot;Locale&quot; under the &quot;System&quot; element:<br>
<br>&quot;&lt;System&gt;<br>    &lt;Locale name=&quot;en&quot; /&gt;<br>&quot;<br><br>If not set then the system default will be used. Left to do is to implement the &quot;get the system default language&quot; for Windows since that requires quite a long translation table and I just want to make sure first if this work/design is accepted by the community before I begin that task :)<br>
<br>The way the patch works: say user is on a Swedish system (system locale/language is sv_SE), then when Aquaria wants to open a text file that supports multiple languages we stat files in the following order (if the requested file is file.txt):<br>
<br>file-sv_SE.txt<br>file-sv.txt<br>file.txt<br><br>And the first file that stat() returns success with we give back to Aquaria to use.<br><br>That way it&#39;s possible to support regional variants of languages while at the same time bailing back to the original (english) file if no language specific file is found. This is also implemented when reading text files from mods so mods can contain translations as well.<br>
<br>The following text files have multi-language support with this patch:<br><br>data/ingredients.txt<br>data/help_header_mac.txt<br>data/help_header.txt<br>data/help_bindsong.txt<br>data/help_energyform.txt<br>data/help_start.txt<br>
data/help_end_mac.txt<br>data/help_end.txt<br>data/achievements.txt<br>data/stringbank.txt<br>scripts/vox/*.txt (audio/*.txt for mods)<br><br>One problem that I can see though is that the scripts/vox/ directory can get very crowded so perhaps we should have separate directories per language there like scripts/vox/it/ scripts/vox/ru/ and so on? Or we should break out all translatable text files into a new root directory &quot;locales&quot; with language sub-directories like<br>
<br>locales/it/ingredients.txt<br>locales/it/vox/*.txt<br>
<br>And then move the originals into locale/en/ ?<br><br>Anyways, here is the first version of the patch. Attached since GMail messes up included diffs from what I&#39;ve learned.<br><br>/Henrik Holst<br>