N
Novu16mo ago
SuPP

Custom handlebars helper

How to create custom handlebars helper?
10 Replies
SuPP
SuPPOP16mo ago
and where is the plural handlebars helper? from older version
Pawan Jain
Pawan Jain16mo ago
Hi @suppmkl You can use pluralize like this
{{pluralize dog_count "dog" "dogs"}}
{{pluralize dog_count "dog" "dogs"}}
We are doing POC on react-email for email editor In future release we are planning to replace handlebar helpers with some other alternative Currently, custom handlebar is not supported which handlebar helper you are looking to add?
SuPP
SuPPOP16mo ago
We would like to extend the current plural for the features of the Russian language
Novu_Bot
Novu_Bot16mo ago
@suppmkl, you just advanced to level 3!
SuPP
SuPPOP16mo ago
as in the i18n library something like - pluralize step.events "пользователь" "пользователя" "пользователей"
Pawan Jain
Pawan Jain16mo ago
You can use it like this.
{{pluralize step.events "пользователя" "пользователей"}}
{{pluralize step.events "пользователя" "пользователей"}}
Linear
Linear16mo ago
SuPP
SuPPOP16mo ago
1 пользователь 2 пользователя 5 пользователей these are the subtleties of the Russian language and that's why we wanted to manually write our helper, I hope you understand what I mean Mike and 1 user wrote you a message Mike and 2 user's wrote you a message Mike and 5 user's wrote you a message but in russian its 3 variants Майк и 1 пользователь написал вам сообщение Майк и 2 пользователя написали вам сообщение Майк и 5 пользователей написали вам сообщение
Pawan Jain
Pawan Jain16mo ago
We are working on multi language translations feature, I think that feature will help in this usecase
SuPP
SuPPOP16mo ago
okay, thank you very match
Want results from more Discord servers?
Add your server