Fast Secure Contact Form PHP Script - by Mike Challis Free PHP Scripts - www.642weather.com/weather/scripts.php Home page - http://www.fastsecurecontactform.com/ Download - http://www.fastsecurecontactform.com/download-php-script Support - http://www.fastsecurecontactform.com/support FAQ - http://www.fastsecurecontactform.com/faq-php-version Changelog - http://www.fastsecurecontactform.com/changelog-php Donate: - http://www.fastsecurecontactform.com/donate ----------------------------------------- Language Translations http://www.fastsecurecontactform.com/translate-php ----------------------------------------- The following translations are included in the download zip file: French (fr_FR) - Translated by Patrick Theriault How to select a language: (there are 3 ways) 1) Setting a Default Language: The default language can be selected by visiting “Site Settings” on the admin page top menu. There is a form select to select a language by country locale. 2) Manually set a form to a specific (non-default language): Edit the PHP code in the HTML body section of the page where your form is located: Just after this: $contact_form = 1; // set desired form number add this: $contact_form_language_override = ‘en_US’; // manual override for default “site settings” language Be sure to change en_US to your desired language. 3) This program can also take a URL parameter to change the language: ?lang=it_IT or ?lang=it (Italian) ?lang=en_US or ?lang=en (English) You are welcome to make a new translation. The language files are stored in the folder /contact-files/languages/ Each available language will have a folder set located there. Here is an example of the Italian language folder structure: /contact-files/languages/it_IT/LC_MESSAGES/fsc-form-it_IT.po /contact-files/languages/it_IT/LC_MESSAGES/fsc-form-it_IT.mo The master file of strings to translate is located here: /contact-files/languages/fsc-form.pot This file is updated for each new version release. gettext files are used for language translation localization. There are three types of files used in the gettext translation framework. These files are used and/or generated by translation tools during the translation process, as follows: fsc-form.pot file: This is the master file of strings to be used by a person who will make or update a translation. The first step is the developer makes this file new for each upgrade version. .po file: Named like this fsc-form-[locale].po, example: the Italian locale is it_IT, so you have: fsc-form-it_IT.po The second step in the localization process is that the translator translates all the messages from the POT file into the target language, and saves both English and translated messages in a PO file. .mo file: Named like this fsc-form-[locale].mo, example: the Italian locale is it_IT, so you have: fsc-form-it_IT.mo The final step in the localization process is that the PO file is run through a program that turns it into an optimized machine-readable binary file (MO file). Compiling the translations to machine code makes the localized program much faster in retrieving the translations while it is running. ---------------------------------------------- How to translate a NEW language? http://www.fastsecurecontactform.com/translate-php ---------------------------------------------- There may already be translation in your language, check before you start! Look in the /contact-files/languages/ folder. Languages can be selected by visiting "Site Settings" on the admin page top menu. There is a form select to select a language by country locale. If the locale you need is not available, continue... Look in the /contact-files/languages/ folder The country code is part of the folder structure and file names. Example for Italian: it_IT. The Italian files would be located like this: /contact-files/languages/it_IT/LC_MESSAGES/fsc-form-it_IT.po /contact-files/languages/it_IT/LC_MESSAGES/fsc-form-it_IT.mo Create the folders you need for your new language files (be sure to change it_IT to the correct locale). Translating With Poedit: If there is not already a translation in your language, you may continue. You should download the free Poedit program to translate, because it makes it easier to translate. http://www.poedit.net/ Locate the plugin POT file /contact-files/languages/fsc-form.pot Getting the latest one from the latest download package is recommended. http://www.fastsecurecontactform.com/download-php-script Save the file fs-contact-form.zip to your computer, unzip and locate the /contact-files/languages/fsc-form.pot file. Open the pot file in Poedit. Click File – New Catalog from POT file. screenshot http://www.fastsecurecontactform.com/wp-content/uploads/2010/08/translating-with-poedit.png Entries are arranged in a list, so that you can easily navigate large catalogs and immediately get an idea about how big part of the catalog is already translated, what needs translating and which parts are only translated in a “fuzzy” way. Fuzzy and untranslated records are highlighted and displayed at the top of the list. Start at the top of the list and translate each line working your way downward. When done translating click Save. Poedit will automatically save the .mo and .po files needed by this program. Be sure to name them like this: Example for Italian: it_IT. fsc-form-it_IT.mo fsc-form-it_IT.po Copy the language files into the folder: (create the proper folders) Example for Italian: it_IT. The country code is part of the file name. The Italian files would be located like this: /contact-files/languages/it_IT/LC_MESSAGES/fsc-form-it_IT.po /contact-files/languages/it_IT/LC_MESSAGES/fsc-form-it_IT.mo How to select a language: Languages can be selected by visiting "Site Settings" on the admin page top menu. There is a form select to select a language by country locale. When you have completed a new translation, please make a contact MIke and request to submit your language files to be included in the plugin download. Be sure to include your name and your web site URL for the credits. http://www.fastsecurecontactform.com/contact ---------------------------------------------- How to UPDATE an already translated language? http://www.fastsecurecontactform.com/update-translation-php --------------------------------------------- This article explains how to take an existing language file and update it. Sometimes a language file will be older than the current version of Fast Secure Contact Form - PHP. In that case there may be some text that appears in English instead of the set language. Download the .po language file from the language folder structure: (unique to each language) Example for Italian: it_IT. The country code is part of the file name. The Italian .po file would be located like this: /contact-files/languages/it_IT/LC_MESSAGES/fsc-form-it_IT.po You should download the free Poedit program to translate, because it makes it easier to translate. http://www.poedit.net/ Open Poedit and click “File – Open”, select the .po file found in the language folder you need to work on. Example for Italian: it_IT, Open Poedit and open the fsc-form-it_IT.po file. Locate the plugin POT file /contact-files/languages/fsc-form.pot Getting the latest one from the latest download package is recommended. http://www.fastsecurecontactform.com/download-php-script Save the file fs-contact-form.zip to your computer, unzip and locate the /contact-files/languages/fsc-form.pot file. After opening the .po file, Click “Catalog – Update from POT file” and select the fsc-form.pot file. Now all you have to translate are the new language strings that have been added to the plugin since the language file was last translated. screenshot http://www.fastsecurecontactform.com/wp-content/uploads/2010/08/translating-with-poedit.png Entries are arranged in a list, so that you can easily navigate large catalogs and immediately get an idea about how big part of the catalog is already translated, what needs translating and which parts are only translated in a “fuzzy” way. Fuzzy and untranslated records are highlighted and displayed at the top of the list. Start at the top of the list and translate each line. When done translating click Save. Poedit will automatically save the .mo and .po files needed by this program. Be sure to name them like this: Example for Italian: it_IT. fsc-form-it_IT.mo fsc-form-it_IT.po Copy the language files into the folder: (create the proper folders) Example for Italian: it_IT. The country code is part of the file name. The Italian files would be located like this: /contact-files/languages/it_IT/LC_MESSAGES/fsc-form-it_IT.po /contact-files/languages/it_IT/LC_MESSAGES/fsc-form-it_IT.mo How to select a language: Languages can be selected by visiting "Site Settings" on the admin page top menu. There is a form select to select a language by country locale. When you have completed a new translation, please make a contact MIke and request to submit your language files to be included in the plugin download. Be sure to include your name and your web site URL for the credits. http://www.fastsecurecontactform.com/contact ----------------------------------------- Please Donate to keep this program FREE ----------------------------------------- If you find this program useful to you, please consider making a small donation to help contribute to my time invested and to further development. Thanks for your kind support! - Mike Challis Some people donate $2, $5, $10, $20, or more. No amount is too small. If you are not able to, that is OK. Donations can be made with your PayPal account, or securely using any of the major credit cards. http://www.fastsecurecontactform.com/donate ----------------------------------------- Terms of Use (Use of this script signifies your acceptance) ----------------------------------------- You are free to use and modify the code This php code provided "as is", and Michael Challis disclaims any and all warranties, whether express or implied, including (without limitation) any implied warranties of merchantability or fitness for a particular purpose. Copyright (C) 2008-2011 Mike Challis (http://www.fastsecurecontactform.com/contact) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA