Annotations in the Alexa Conversations Core Library
Note: Alexa Conversations Description Language (ACDL) is offered as a beta and may change as we receive feedback and iterate on the feature. ACDL currently supports the following locales:
• (GA)
• (Beta)
• (GA)
en-US
• (Beta)
en-AU
, en-CA
, en-IN
, en-GB
, de-DE
, ja-JP
, es-ES
, es-US
The Alexa Conversations Core Library (ACCL) provides annotations that you can use in Alexa Conversations Description Language (ACDL) files.
@locale
You localize your Alexa Conversations skill by using the @locale
annotation. You can apply the @locale
annotation to a name declaration, a dialog, or a sample. You can then use the variations()
action to aggregate localized events or responses into one event or response that you can use in a locale-agnostic dialog.
Note: Expressions without the
@locale
annotation are global. In other words, the expressions apply to all locales.Examples
The following example shows how to use the @locale
annotation to specify that the skill supports en-US
.
@locale(Locale.en_US)
welcome_en = apla("/lib/prompts/en/welcome")
The following example shows how to specify locales for samples under a dialog.
@locale(Locale.de_DE, Locale.en_US)
dialog Nothing myGreetingBot {
// This sample will be deployed to de-DE.
@locale(Locale.de_DE)
sample {
expect(Invoke, hello)
...
}
// This sample will be deployed to en-US.
@locale(Locale.de_DE)
sample {
expect(Invoke, hello)
...
}
// This sample will be deployed to en-US and de-DE.
sample {
expect(Invoke, hello)
...
}
}