question

ise avatar image
ise asked

Multiple language support in lambda

Hi,

I develop a lambda for a smart home skill that will be available in german and english (uk). The necessary settings in the developer console are simple, but: how can I get the used locale in the lambda? I would get the user a localized version of the friendly description in the discovery response. When I use english us (or india, or or) so I can switch the region and set an other lambda endpoint with an environment variable. German and englisch uk are both in ireland (eu) so this hack doesn't works for me... Can I get locale in the API with an undocumented way? Currently I use payload version 2.

skillalexa smart homelambda
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Jenn@amazon avatar image
Jenn@amazon answered

It shouldn't matter which language locale the user is making the request from. The friendlyName should correspond with what the user has defined through your smart home service.

I would strongly recommend updating to v3 of the Smart Home API. I don't believe we're accepting any new submissions for SmartHome Skills using v2.

2 comments
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi, I have a similar problem.

According to List of Alexa Interfaces and Supported Languages, we should to return interfaces supported by the user's language setting when the user discovery devices.

How can we get user's language setting?

I'm using v3 API.

Thanks

0 Likes 0 ·
Amazon_Bernardo Bezerra avatar image Amazon_Bernardo Bezerra newuser-e3d03274-a2e7-4231-9d60-98a6268f84ce commented ·

Hello and thank you for your message.

Requests for smart home skills do not contain locale information. As mentioned by Jenn, it shouldn't matter where the user is making the request from. If a particular interface is not available in a locale, then Alexa will reply with an error message.

Regards,
Barry

0 Likes 0 ·