Reputation: 5419
I would like to purchase the product Paymill Gateway for one of our customers. His website comes with 3 different languages: German, English and French
As far as I know Paymill supports these 3 languages but how exactly would that work? Can I only CHOOSE between one of those languages or would the details of the page automatically get translated whenever the user switches the language of the website?
I hope somebody has experience with this plugin and can update me with some details.
Upvotes: 0
Views: 98
Reputation: 3903
If you are using the paymill.createToken function, validation happens in JavaScript. The function passes an error object in its callback; the error code can be accessed through error.apierror.
You can build a language map to display the error message in different languages. For example:
var messages={
'en':{
'field_invalid_card_number':'Invalid Card Number',
'field_invalid_card_exp': The card has expired'
},
'de':{
'field_invalid_card_number':'Ungueltige Kartenummer',
'field_invalid_card_exp':'Die Karte ist abgelaufen'
}
}
Then with some additional logic you may display the suitable target language.
Upvotes: 0
Reputation: 1
you should consider trying out the free but official alternative on https://wordpress.org/plugins/paymill/
In the official plugin there are several language packs included which are loaded depending on your language settings in WordPress. The plugin WordPress MultiLanguage can help to serve different languages and switching between them.
Please also note that support requests may be faster handled on official support forum https://wordpress.org/support/plugin/paymill
Upvotes: 0