Revision 1 - 2 jan 2007
Translating StuffPlug 3 is incredibly easy, and involves only a few simple steps. If you follow these instructions carefully, you should be able to get your own StuffPlug 3 translation within a few hours. If you encounter any problems, do not hesitate to ask on the StuffPlug.com Forum
Translating StuffPlug 3 can only be done on Windows 2000 or XP or higher. Although editing of the language files can be done on Windows 95/98/ME, the language encoder will simply not work on those operating systems.
Currently, a right-to-left layout is not supported in StuffPlug 3. I do have plans to support it in the future, but I haven't come round to it yet. In the mean time, you can just use the LTR layout with RTL languages.
To make sure users can find your language easily, you should find or create a little flag of your country or region. The flag should be a PNG-image of exactly 60 by 40 pixels. Although there is no limit to the filesize of this flag, you should aim to keep it under 10 kb to keep your language file as small as possible.
An example flag is GreatBritain.png, the flag used for the standard english translation of StuffPlug 3
If your language uses unicode, be sure to find a text-editor that is able to save as UTF-8 or pure Unicode. Examples and instructions how to save as unicode are below:
On Windows 2000 and higher the standard Notepad can save as Unicode too. To save as Unicode, select File -> Save As, and for "Encoding" choose either "Unicode" or "UTF-8"
A shareware version of UltraEdit-32 can be found at UltraEdit.com. To save as Unicode, select File -> Save As, and for "Format" choose either "UTF-8" or "Unicode - ASCII Escaped"
Undoubtedly there are more editors available to edit unicode files, but these are the two that I am aware of. If you would like to recommend another editor to be included in a newer version of this guide, please create a new topic on the StuffPlug.com Forum
The first thing to do now is opening DefaultLg.dat with your preferred text-editor. You will notice that it's split into sections marked by [Name], and that these sections contain strings to be translated in the form of Key=Value. The Section headers and key-names should not be changed. The only thing you should ever change are the values after the =-sign. Your first step is to edit the [Language Options] section. Set Name to the name of the language you are translating to, and set Info to a little information (for example "Made by (your name)"). NameA and InfoA should be set to the name and info, but without using unicode (so only the basic english alphabet), to be used in the installer. Next Set Flag to be the filename to the flag you created during the preparation.
After you have set the language options, it's time to take a look at the other sections. In each section, be sure to translate everything behind the =-sign. If you need a newline, use {NEWLINE}. And also please mind that things like %1!s! should stay intact to keep StuffPlug functioning correctly.
When you're done, save the file as Lang_(name of your language).ini (preferably in the Translate directory), and move on to the next step
Sometimes editors will not let you type unicode unless the file is saved as Unicode. In that case, save it as unicode as Lang_(language).ini first, and then translate.
Before StuffPlug 3 can use your language file, you will first have to convert it to an splng file. You can do so using the SPLngEncoder utility.
First, open up a command-prompt. To do so, go to Start -> Run, type cmd, and hit OK. You should be presented with a screen like this:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Administrator>
First, type the drive where StuffPlug 3 is installed (e.g. C:), then type "cd \directory". For example:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Administrator>C:
C:\Documents and Settings\Administrator>cd \Program Files\StuffPlug3\Languages\Translate
C:\Program Files\StuffPlug3\Languages\Translate>
Now it's time to actually use the SPLngEncoder utility. You should use it like this: "SPLngEncoder <Input file> [Output file]". For example, to translate the imaginary Dutch translation:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Administrator>C:
C:\Documents and Settings\Administrator>cd \Program Files\StuffPlug3\Languages\Translate
C:\Program Files\StuffPlug3\Languages\Translate>SPLngEncoder Lang_Dutch.ini ..\Lang_Dutch.splng
Opening file
Reading language options
Name: Nederlands
Info: Nederlandse vertaling
Read 3295 flag bytes
Writing language options
C:\Program Files\StuffPlug3\Languages\Translate>
After you have run the SPLngEncoder, your language file should be done and located in the languages directory. If you go to the StuffPlug Language dialog (StuffPlug 3 -> Welcome -> Language), your language should already appear in the list.
To send your language file to others, simply send them the Lang_(language).splng file located in the Languages directory and let them place it in the language directory
To get your translation to be part of the official StuffPlug 3 package, please send an email to translating@stuffplug.com
Added NameA and InfoA to data