GoodIntentionsAssistant / gi

Good Intentions Node.js Assistant Framework
http://goodintentions.firecreekweb.com
MIT License
3 stars 1 forks source link

Dialog, text files to support multiple languages #100

Closed darrenmoore closed 5 years ago

darrenmoore commented 6 years ago

User should be able to set their language and templating should support it.

In the skill directory have a locale file, maybe yaml. Maybe these are just templates, /skill/templates/ instead of being directly language files?

en.yaml response.normal = "Ice coffee is cold"

th.yaml response.normal = ''

return '{{response.normal}}'; return this.template.render('normal',[parameters]);

Or maybe.. return response.dialog('normal', { extra params });

parameters should be supported via names, response.normal = 'Ice coffee is {{price}} baht'; this.template.render('normal',{ price:80 });

Should be able to support random results response.normal