alexa-samples / skill-sample-nodejs-fact

Build An Alexa Fact Skill
Apache License 2.0
1.15k stars 1.19k forks source link

what is .t() in this line of code randomFact = requestAttributes.t('FACTS');? #130

Closed Ayushimidha28 closed 1 year ago

Ayushimidha28 commented 4 years ago

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?

mauriliofilho commented 4 years ago

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