alexa-ssml-jsx-l10n

1.0.1 • Public • Published

alexa-ssml-jsx-l10n

This package provides a convenient way to localize skills developed with the alexa-ssml-jsx package.

Example usage

import ssml from 'alexa-ssml-jsx';
import L10n from 'alexa-ssml-jsx-l10n';
 
const l10n = new L10n({
  'HELLO_WORLD': {
    'de_DE': <speak>Hallo Welt!</speak>,
    'en_EN': <speak>Hello World!</speak>
  },
  'GREETING': {
    'de_DE': (p) => <speak>Hallo {p.firstName}!</speak>,
    'en_EN': (p) => <speak>Hello {p.firstName}!</speak>
  }
});
 
l10n.get('HELLO_WORLD', 'de_DE');
l10n.get('GREETING', 'en_EN', { 'firstName': 'Alexa'});

Development

build

npm run build

This transpiles the example/example.jsx file into the test directory.

test

npm run test

Package Sidebar

Install

npm i alexa-ssml-jsx-l10n

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • konstantin.ai