This How-To guide explains how you can translate FormMail messages into another language to assist your customers and the community of other websites that use FormMail.
Introduction
From version 5.02 of FormMail, it has supported languages other than English.
The first translation was to German and our thanks go to Erich Rieder for his efforts.
To begin a translation, ensure you have the latest FormMail. Use the FormMail Upgrade Wizard to ensure you have the very latest FormMail.
Formmail.php has English builtin and you simply install a file called "language.inc" in the same directory on the server to get a replacement language to override the builtin messages.
Message Translation
To perform a translation:
- Upload formmail.php to your server for testing the translation. You can call it something else so it doesn't clash with any existing formmail.php you might have.
- Download the language pack and unzip it to get the language_en.inc file. This contains the English messages.
- Copy language_en.inc to language_fr.inc for French, language_se.inc for Swedish etc.
- Follow the instructions in the file.
Quick Start Translation
Once completed, there are two more translations tasks to perform. The first is the "Quick Start" guide that we provide at the top of formmail.php.
Please translate the following text and place it in a file called "quickstart.txt" (or the equivalent file name for your language - for example, in German this is "schnellstart.txt").
Read This First
~~~~~~~~~~~~~~~
This script is very heavily documented! It looks daunting, but
really isn't.
If you have experience with PHP or other scripting languages,
here's what you *need* to read:
- Features
- Configuration (TARGET_EMAIL & DEF_ALERT)
- Creating Forms
That's it! (Alternatively, just read the Quick Start section below).
Quick Start
~~~~~~~~~~~
1. Edit this file and set TARGET_EMAIL for your requirements (approx
line 2601 in this file - replace "yourhost\.com" with your mail server's
name). We also strongly recommend you set DEF_ALERT (the next
configuration below TARGET_EMAIL).
2. Install this file as formmail.php on your web server
3. Create an HTML form and:
- specify a hidden field called "recipients" with the email address
of the person to receive the form's results.
- specify method "post" (or "get") and an action set to
the formmail.php you uploaded to your web server
Once you have FormMail working, you may be interested in some advanced
usage and features. We have How-To guides at www.tectite.com which
describe many of the advanced processing you can do with FormMail.
Purpose:
~~~~~~~~
To accept HTTP POST information from a form and mail it to recipients.
This version can also supply data to a TectiteCRM document, usually
for insertion into the CRM database.
What does this PHP script do?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
On your web site, you may have one or more HTML forms that accept
information from people visiting your website. Your aim is for your
website to email that information to you and/or add it to a database.
formmail.php performs those functions.
Forum Text Translation
The last translation is for the following text. This will be placed in our public downloads area where people can download your translation.
Replace "German" with the language to which you've translated. Replace "schnellstart.txt" with the name of the file you've created for the Quick Start above.
Replace "language_de.zip" with the name of the language file you've created (we package language_xx.inc into a ZIP file called language_xx.zip together with the Quick Start text file).
Please place the following translation in a file called "forumtext.txt".
FormMail now supports languages other than English.
You need version 5.02 or later to have this feature available.
To enable German, download the attached package called
"language_de.zip".
Extract "language.inc" from that ZIP package and upload
it to your server in the same directory as formmail.php.
FormMail will automatically include the language.inc
file and all messages will appear in the corresponding
language.
The file called "schnellstart.txt" contains basic
FormMail configuration information in German.
We thank <Your Name> for their work in the carrying out
the translation to German.
Send Us The Files
Finally, send the files you've created to us for publishing.
Acknowledgement
We're most happy to acknowledge your work both at the point of download as well as on this page. Please tell us the text you would like to include in the acknowledgement including a link to your website, if desired.