egg
egg copied to clipboard
Adding new function to Nunjucks
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?