2014-04-10 26 views
0

美好的一天大家,paypal add to cart button //多语言支持

需要在我的多语言网站上编码以下功能。 如果我的客户javascript选择在例如德语,“加入购物车”按钮必须更改为德语,按下后,打开德语版的购物车。

我很难找到如何在JavaScript上面描述的流程的信息。任何人都知道我可以挖掘的任何链接?

提前致谢!

回答

0

您需要做一些事情来完成这项工作。当您更改语言,您需要在按钮设置的几件事情:

您需要的LC值更新为您所选择,例如该国:

<input type="hidden" name="lc" value="US" /> 

<input type="hidden" name="lc" value="DE" /> 

,你也将要更新的按钮图像:

<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_cart_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!" /> 

<input type="image" src="https://www.paypalobjects.com/de_DE/i/btn/btn_cart_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!" /> 

将更新按钮图像。

您可以找到国家代码和他们的“语言环境”在https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECButtonIntegration/

我在创建行动的一个简单的例子:http://jsfiddle.net/F5VM2/14/