egg icon indicating copy to clipboard operation
egg copied to clipboard

Adding new function to Nunjucks

Open sm2017 opened this issue 2 years ago • 7 comments

In documentation we have

<li>{{ __('Email') }}: {{ user.email }}</li>
<li>
  {{ __('Welcome back, %s!', user.name) }}
</li>
<li>
  {{ __('Hello {0}! My name is {1}.', ['foo', 'bar']) }}
</li>

I want to know how you add __ to the Nunjucks, I need to add a t function for my localizations Can you please show me the source code?

sm2017 avatar Nov 20 '21 07:11 sm2017