Adding new function to Nunjucks
Open
Inactive
plugin: egg-i18n
plugin: egg-view-nunjucks
Question
- Dominant language
- TypeScript
- Stars
- 19k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
In [documentation ](https://eggjs.org/en/core/i18n.html#use-in-view) we have
```html
{{ __('Welcome back, %s!', user.name) }}
{{ __('Hello {0}! My name is {1}.', ['foo', 'bar']) }}
```
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?
Contributor guide
Assessment
This issue has not been assessed yet.