/** * Add almisbar translation engine */ function translate_form_custom($message) { translate_new_form('http://www.almisbar.com/scripts/ata/txttrs.dll'); echo '<p align="center">'; echo '<input name="lang" type="hidden" value="eng" />'; echo '<input name="auth" type="hidden" value="no" />'; echo '<input name="text" type="hidden" value="' . $message . '" />'; echo 'Al Misbar: <input type="submit" class="button" value="' . _("Translate") . '" />'; echo '<br />'; echo _("Translation Theme:") . ' '; echo '<select size="1" name="atatheme">' . '<option value="0">' . "General" . '<option value="M">' . "Entertainment & Music" . '<option value="H">' . "Sport" . '<option value="1">' . "Business" . '<option value="2">' . "Medical Science" . '<option value="3">' . "Engineering" . '<option value="4">' . "Technology" . '<option value="5">' . "Religion" . '<option value="6">' . "Law & Order" . '<option value="7">' . "Media & Journalism" . '<option value="8">' . "Humanities" . '<option value="9">' . "Agriculture" . '<option value="A">' . "Military" . '<option value="B">' . "Intelligence & Police" . '<option value="C">' . "Politics & Diplomacy" . '<option value="D">' . "Education" . '<option value="E">' . "Industry" . '<option value="F">' . "Oil & Minerals" . '<option value="G">' . "Arts & Literature" . '<option value="I">' . "Space & Astronomy" . '<option value="J">' . "Food & Drink" . '<option value="K">' . "Weather" . '<option value="L">' . "Government" . '<option value="N">' . "Science" . '</select>'; echo '<br />'; echo '<input checked="checked" id="option1" name="options" type="checkbox" value="translit" />'; echo "Transliteration of abbreviations"; echo '<input checked="checked" id="option2" name="options" type="checkbox" value="abbr" />'; echo "Transliteration of proper nouns"; echo '<input name="vowels" type="checkbox" value="a" />'; echo "Show Harakat"; echo '</p>'; translate_table_end(); }
/** * google translation engine * * @param string $message text that has to be translated * @access private */ function translate_form_google($message) { translate_new_form('http://www.google.com/translate_t', 'utf-8'); echo '<input type="hidden" name="text" value="' . $message . '" />'; echo '<select name="langpair">' . translate_lang_opt('en_US', 'de_DE', 'en|de', sprintf(_("%s to %s"), _("English"), _("German"))) . translate_lang_opt('en_US', 'es_ES', 'en|es', sprintf(_("%s to %s"), _("English"), _("Spanish"))) . translate_lang_opt('en_US', 'fr_FR', 'en|fr', sprintf(_("%s to %s"), _("English"), _("French"))) . translate_lang_opt('en_US', 'it_IT', 'en|it', sprintf(_("%s to %s"), _("English"), _("Italian"))) . translate_lang_opt('en_US', 'pt*', 'en|pt', sprintf(_("%s to %s"), _("English"), _("Portuguese"))) . translate_lang_opt('en_US', 'ar', 'en|ar', sprintf(_("%s to %s"), _("English"), _("Arabic"))) . translate_lang_opt('en_US', 'ja_JP', 'en|ja', sprintf(_("%s to %s"), _("English"), _("Japanese"))) . translate_lang_opt('en_US', 'ko_KR', 'en|ko', sprintf(_("%s to %s"), _("English"), _("Korean"))) . translate_lang_opt('en_US', 'zh_CN', 'en|zh-CN', sprintf(_("%s to %s"), _("English"), _("Chinese, Simplified"))) . translate_lang_opt('de_DE', 'en_US', 'de|en', sprintf(_("%s to %s"), _("German"), _("English"))) . translate_lang_opt('de_DE', '', 'de|fr', sprintf(_("%s to %s"), _("German"), _("French"))) . translate_lang_opt('es_ES', '', 'es|en', sprintf(_("%s to %s"), _("Spanish"), _("English"))) . translate_lang_opt('fr_FR', '', 'fr|en', sprintf(_("%s to %s"), _("French"), _("English"))) . translate_lang_opt('fr_FR', '', 'fr|de', sprintf(_("%s to %s"), _("French"), _("German"))) . translate_lang_opt('it_IT', '', 'it|en', sprintf(_("%s to %s"), _("Italian"), _("English"))) . translate_lang_opt('pt*', '', 'pt|en', sprintf(_("%s to %s"), _("Portuguese"), _("English"))) . translate_lang_opt('ar', '', 'ar|en', sprintf(_("%s to %s"), _("Arabic"), _("English"))) . translate_lang_opt('ja_JP', '', 'ja|en', sprintf(_("%s to %s"), _("Japanese"), _("English"))) . translate_lang_opt('ko_KR', '', 'ko|en', sprintf(_("%s to %s"), _("Korean"), _("English"))) . translate_lang_opt('zh_CN', '', 'zh-CN|en', sprintf(_("%s to %s"), _("Chinese, Simplified"), _("English"))); echo '</select>' . '<input type="hidden" name="hl" value="en" />' . '<input type="hidden" name="ie" value="UTF8" />' . '<input type="hidden" name="oe" value="UTF8" />' . 'Google: <input type="submit" value="' . _("Translate") . '" />'; translate_table_end(); }