Skip to content

Support language parameter

Choose a tag to compare

@judgej judgej released this 11 Jul 18:44
· 145 commits to master since this release

The language property can be set at the gateway or message level, and is available for both Direct and Server API variants. When visiting an offsite payment form, the displayed language is the one selected (from a small selection - see the Sage Pay documentation). It should also affect the language used in any return error messages, though that has not been tested.

The language can be supplied as an alpha-2 ISO string, for example GB or FR, and is case-insensitive. It can also be supplied as a locale string for convenience, for example en-GB and fr-BE (these will result in English and French languages respectively).

See Issue #102

This has not been ported to the 2.x branch.