skill-sample-nodejs-fact
skill-sample-nodejs-fact copied to clipboard
what is .t() in this line of code randomFact = requestAttributes.t('FACTS');?
I didn't get what is .t( ) in this line const randomFact = requestAttributes.t('FACTS');. Is t( ) is an inbuilt function? what is it doing?
This is part of Interceptors method, to load strings const based on your language/locale of you Skill is
look at line 148 on attributes.t = function translate(...args) { this is where .t() is loaded with your strings 'FACTS' on bottom of file, you find all string to your skill based on language/locale