First you will need to have the latest version of metapad which supports the language plugins (introduced in version 3.5). It is available for download here.

The next step is to download the language plugin DLL template. There are two different options for you the translator to go about creating your metapad language plugin.

The first option (and probably easiest for most people) is to download the plugin DLL binary and use Resource Hacker, a free and excellent windows app, to modify it. (Other programs may be used.. if you know of any that are as good or better than Resource Hacker than let me know.) Simply open the template DLL in Resource Hacker and modify the contents according to the guidelines below. Save the modified DLL and you're done.

The second option is to download the plugin DLL project. This contains the complete source code for the plugin DLL for Microsoft Visual Studio (aka Microsoft Visual C++). You may also be able get this working with other Win32 compilers (like Borland Builder). Simply edit the resources according to the guidelines below and compile the DLL. But this method requires that you have Visual Studio available to you and that you know how to use it (believe me, for what you will be doing it is not hard at all). Note that no knowledge of programming is needed; only resources (user interface elements) must be modified (in a visual manner - no coding).

Project users: be sure to build with /NOENTRY (Linker > Advanced > No entry point) to generate a "resource only" DLL. This will ensure no unnecessary DLLs are required on the user's system.

Translation Guidelines

Strings
The maximum string length is 500 characters. Any string longer than that will be cut off at runtime. If you think this will be a problem then let me know but currently the longest english string is only around 150 characters in length.

Dialogs
Dialogs should be straightforward but will likely have to be extended in width to make room for different languages. Try to keep the dialogs looking nice and only alter their sizes if necessary. Try to make sure that dialog accelerators (the letter with the & which draws an underscore) don't clash on any single dialog. Note that on both the find and replace dialogs there is a hidden edit box with id 1152 that must be there or else the dialogs won't work.

Menus
Menus should also be quite easy. Also here make sure that the accelerators (the letter with the & which draws an underscore) are unique on each submenu. Some menu text is located in the string table ("Recent", "Language Plugin"). If you change the menu accelerator for any of the 6 main menu items be sure to see that they don't conflict with any of the tool accelerators (e.g., if the "&File" menu changed to "&Dile" then it would conflict with Insert File's accelerator of Alt+D so you would have to change one or the other).

Accelerators
I recommend against altering the accelerators. I've included the accelerator table because I understand that some of the standard ones (e.g., Ctrl+O for open) are language dependant. You should only change the ones that are not windows standard accelerators (e.g., what Word or IE use) for your language. Also make sure to change the menu item text correspondingly. Note that metapad uses almost every accelerator available so you will have to swap an accelerator you want with something else. Here is an example of using Resource Hacker to change the new file accelerator (Ctrl+N). This is by no means user friendly so be careful. First locate the menu item for the command you want to change (menu 130, line: MENUITEM "&New\tCtrl+N", 40012) and the one you want to swap it with (say MENUITEM "R&ead Only\tCtrl+E", 40055). Change the text in the quotes to reflect the swap ("&New\tCtrl+E", "R&ead Only\tCtrl+N") and note the two IDs for these menu items (40012 & 40055). Next, go to the accelerator table and find the item for Ctrl+N under VK_N and replace 40012 with 40055. Then go to VK_E and replace 40055 with 40012.

Versioning
In order to make sure that the language plugin is for the current version of metapad there is a "version synch string" which is the first string in the string table. This must match the current metapad version otherwise the language DLL won't load.

Info Dialog
There is also a new language plugin information dialog which is available from the help menu when using a language plugin. This dialog uses strings 2-5 of the string table to populate itself. Put your language, plugin revision number and contact information in these strings.

File Naming
Use the corresponding country's code for your language when naming files if possible. Please use the country where the language originated (not the country where you happen to be from) unless you are working on a variant of the language that would require a separate plugin. Here is a list of country codes. For example the French language plugin should be called mpad35B1_fr_1.dll (and zipped to mpad35B1_fr_1.zip). This means metapad 3.5 Beta 1 French language plugin release 1. If you fix any bugs and make a new version call it mpad35B1_fr_2.dll (and also update the third string in the string table to reflect this). You might also want to add a readme file to the distribution zip file.

Important Notes

There is just one plugin DLL which works with both metapad LE and the full version. One dialog has a special LE version along with its full version and both need to be translated. Please test your plugin DLL with both versions.

Some languages will require you to set the language for each resource type to your language in particular. Resource Hacker users should consult the following table. Then for each resource in the plugin locate the string "LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US" and replace the
identifiers with your corresponding language. Thus for Greek you would replace each language string with "LANGUAGE LANG_GREEK, SUBLANG_DEFAULT". If you are using the Visual Studio project you can simply choose the corresponding language in the property tab for each resource type in ResourceView (i.e., right click each resource (string table, each dialog etc.) and choose properties and there should be a language dropdown on the tab).

For project users working on a subsequent version of the DLL you can copy the unchanged sections of the metapad.rc file from your previous translation and paste them into the new version. If you are using Resource Hacker to edit a new version of the plugin DLL then you can copy and paste the unchanged sections from your previous translated DLL so you don't have to redo the entire thing. Try opening two instances of Resource Hacker side by side (one with the old and one with the new). Be sure that resources haven't changed before overwriting a new one with the old (previously translated) version. I will try to make note of any further changes made to the resources in new releases of metapad.

Resource changes in Metapad 3.6

Dialogs (6 changes):

"&Quote string:" on General tab is now "&Quote with:"

New check box on the top right of General tab shifting others down: Remem&ber last folder" mapped to IDC_CHECK_SAVEDIRECTORY (id=1041),

Tab "Advanced 1" is now "Advanced"

Tab "Advanced 2" is now "Buffers && Language" (note: two ampersands needed to make one)

IDS_PLUGIN_MISMATCH_ERROR
"Your language plugin is for metapad %s, but you are running metapad %s.\n\nSome menu or dialog features may be missing or not work correctly.\n\nRun metapad /v to skip this message."