sibelius / ast-i18n

Easily migrate your existing React codebase to use i18n
MIT License
215 stars 18 forks source link

Make t function call configurable #47

Open katilius opened 5 years ago

katilius commented 5 years ago

Tagged Template Literals allows you to call the function by providing just ticks. This could be leveraged, to make syntax a bit less verbose, when dealing with translations:

<span>{t('key')}</span>

becomes

<span>{t`key`}</span>

This is, of course, a matter of preference, so it probably should be configurable.