-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
egg-i18n 可以支持下 template string 的语法 #58
Labels
Comments
这个好像没啥用,我们都是配置文件。 |
支持多一种语法,哈哈 |
没想明白改怎么用 |
就是在 locals 里面注入个 i18n 这个函数, 然后就可以 {{ i18n`Hello ${user.name}, how are you today?` }}
// vs
{{ __('Hello %s, how are you today?', user.name) }} |
这种太慢了,还是不要提供吧,如果要我们来实现的话要 replace |
ok |
elrrrrrrr
pushed a commit
to elrrrrrrr/egg
that referenced
this issue
Feb 21, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
{{ i18n
Hello ${user.name}, how are you today?}}
The text was updated successfully, but these errors were encountered: