diff options
author | Romain d'Alverny <rda@mageia.org> | 2011-01-18 14:41:38 +0000 |
---|---|---|
committer | Romain d'Alverny <rda@mageia.org> | 2011-01-18 14:41:38 +0000 |
commit | 597ed4b5bc777af9e3aaf1ccad91d2c8656ad01c (patch) | |
tree | b81d5142a39c2addb2e110b7f00e2f382c5e10a8 | |
parent | 0a17fcc8837f086f5f70093ae955c3c72fdb48af (diff) | |
download | www-597ed4b5bc777af9e3aaf1ccad91d2c8656ad01c.tar www-597ed4b5bc777af9e3aaf1ccad91d2c8656ad01c.tar.gz www-597ed4b5bc777af9e3aaf1ccad91d2c8656ad01c.tar.bz2 www-597ed4b5bc777af9e3aaf1ccad91d2c8656ad01c.tar.xz www-597ed4b5bc777af9e3aaf1ccad91d2c8656ad01c.zip |
better localized payment button (wobo)
-rw-r--r-- | paypal.inc.php | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/paypal.inc.php b/paypal.inc.php index ac7a97d1c..fd5a77f39 100644 --- a/paypal.inc.php +++ b/paypal.inc.php @@ -6,14 +6,29 @@ */ function html_paypal_form($lang = 'en') { - + $buttons = array( + 'en' => 'en_US', + 'fr' => 'fr_FR', + 'es' => 'es_ES', + 'de' => 'de_DE', + 'it' => 'it_IT', + 'nl' => 'nl_NL', + 'pl' => 'pl_PL', + 'zh' => 'zh_CN', + 'zh_cn' => 'zh_CN' + ); + if (!array_key_exists($lang, $buttons)) + $lang = 'en'; + + $btnLoc = $buttons[$lang]; + $html = <<<H <form action="https://www.paypal.com/cgi-bin/webscr" method="post" id="pp_form"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="62X2MFQRAYABL"> <p id="pp_form_btn"> - <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> - <img alt="" border="0" src="https://www.paypal.com/fr_FR/i/scr/pixel.gif" width="1" height="1"> + <input type="image" src="https://www.paypal.com/{$btnLoc}/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> + <img alt="" border="0" src="https://www.paypal.com/{$btnLoc}/i/scr/pixel.gif" width="1" height="1"> </p> </form> H; |