Localization (Multilingual)

SG Patcher has a localization system. This system changes key phrases depending on the language of the system.

Default Language Sheet

You can download an example localization file for English, follow steps:

  1. Go to the "Advanced" tab.
  2. Push on "Save File (English)" button and choose "loc" folder.image-1590933032324.png

Edit Localization Sheet

Open the sample localization file. You will see xml code with an enumeration of keys and values.

<?xml version="1.0" encoding="utf-16"?>
<LocalizeSheet xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <localizeKeys>
    <LocalizeKey>
      <Key>Check_updates</Key>
      <Value>Check updates...</Value>
    </LocalizeKey>
    <LocalizeKey>
      <Key>Check_integrity</Key>
      <Value>Check integrity...</Value>
    </LocalizeKey>
    <LocalizeKey>
      <Key>No_updates_required</Key>
      <Value>No updates required.</Value>
    </LocalizeKey>
   ...
   </localizeKeys>
</LocalizeSheet>

You can only change values. Change the values for the language you need and save the file with the appropriate name(ex. English.xml) in the "loc" folder.

The file contains values with auxiliary "{0}" or "{1}". These code inserts are necessary for the system to output dynamic parameters. If your implementation does not need dynamic parameters, then you can not use the constructions "{0}" or "{1}" leaving just the text.

<LocalizeKey>
  <Key>Downloading_file</Key>
  <Value>Downloading file - {0} - {1}%...</Value>
</LocalizeKey>

If you do not want to use dynamic parameters, remove all inclusions "{}" from the value. You can not delete only one inclusion in a value!


Revision #7
Created Sun, May 31, 2020 1:34 PM by Admin
Updated Fri, Jul 17, 2020 4:39 PM by Admin