If you serve a global audience you can offer a Login with Amazon and Amazon Pay experience for your buyers in five different languages: English, French, German, Italian, or Spanish.
- The multi-language feature is only available to merchants using the latest libraries of Login with Amazon and Amazon Pay.
- To make sure that you are using the latest version, please check that your Login with Amazon or Amazon Pay buttons are created based on the class "OffAmazonPayments.Button", and not on the class "OffAmazonPayments.Widgets.Button", as described in Step 3: Add a Button widget.
Login and consent screens
Amazon Pay provides a language switcher on both the login and consent screens.
The login screen displays in the session language that was last used by the Login with Amazon or the Amazon Pay buttons. The consent screen displays in the session language that was last used by the login screen.
When the buyer has switched the language on the login or consent screen, the screen displays in that language, as do all of the links that branch out of the screen.
Note that when a buyer opts to view your website in a different language, the language selection is preserved as long as the buyer's session is active. When the buyer revisits your site, they need to make the language selection again.
Amazon Pay widgets
The Amazon Pay AddressBook and Wallet widgets and their links display in the session language last used by the login screen or the consent screen if the buyer was required to grant consent.
You can use the GetOrderReferenceDetails API to retrieve the language that the buyer has chosen. The response for this operation includes an OrderLanguage element, which contains information that you can use for applying the buyer's preferred language to all future communications with the buyer.
For more information, see Accessing order information at the time of buyer login.
The following sample response to the GetOrderReferenceDetails API call shows the OrderLanguage element that is returned in the OrderReferenceDetails datatype.
<GetOrderReferenceDetailsResponse xmlns="http://mws.amazonservices.com/schema/OffAmazonPayments/2013-01-01"> <GetOrderReferenceDetailsResult> <OrderReferenceDetails> <AmazonOrderReferenceId> P01-1234567-1234567 </AmazonOrderReferenceId> <CreationTimestamp>2012-11-05T20:21:19Z</CreationTimestamp> <ExpirationTimestamp>2013-05-07T23:21:19Z</ExpirationTimestamp> <OrderReferenceStatus> <State>Draft</State> </OrderReferenceStatus> <OrderLanguage>de-DE</OrderLanguage> <Destination> <DestinationType>Physical</DestinationType> <PhysicalDestination> <City>New York</City> <StateOrRegion>NY</StateOrRegion> <PostalCode>10101-9876</PostalCode> <CountryCode>US</CountryCode> </PhysicalDestination> </Destination> <ReleaseEnvironment>Live</ReleaseEnvironment> </OrderReferenceDetails> </GetOrderReferenceDetailsResult> <ResponseMetadata> <RequestId>5f20169b-7ab2-11df-bcef-d35615e2b044</RequestId> </ResponseMetadata> </GetOrderReferenceDetailsResponse>
For information about the OrderReferenceDetails data type, see OrderReferenceDetails.
Emails that are sent to a buyer display in the session language used by the buyer during the checkout for that order. All of the links in the emails also display in the same language. For example, if the email is in French, the links redirect the buyer to content in French.
The following table shows the language that is displayed based on the order of precedence.
|Language passed by the website||Browser language||Display buttons||Display login and consent screens||Language selected by the buyer||Display widgets and emails|
Example 1, you have passed French as a language. This overrides the buyer's browser language preference settings of German, and so all of the login and consent screens are rendered in French. The buyer then opts to switch to Italian. The widgets and emails are displayed in Italian.
Example 2, you have passed French as a language. This overrides the buyer's browser language preference settings of Romanian, and so all of the login and consent screens are rendered in French. The buyer then opts to switch to Italian. The widgets and emails are displayed in Italian.
Example 3, you have passed Romanian as a language, which is not supported by Amazon Pay. In this case, the buyer's browser language preference setting of French overrides the language that you have passed. The widgets and the login and consent screens are displayed in French. The buyer then opts to switch to Italian. The widgets and emails are displayed in Italian.
Example 4, you pass an unsupported language, and the buyer's browser language preference setting is also unsupported. The widgets and the login and consent screens are displayed in English. The buyer then opts to switch to Italian. The widgets and emails are displayed in Italian.