-
-
Notifications
You must be signed in to change notification settings - Fork 209
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
Expose formatElements #948
Comments
Verify first if |
Thanks @aralroca , it does work for me with either esm of cjs. Thouhg Typescript definitions are missing. |
Feel free to PR to add the Typescript definitions, and to do it public you can add this file here: https://github.com/aralroca/next-translate/blob/master/package.json#L32 |
Thanks, I'll do it when I find the time 👍 |
@testerez do you already need |
Sorry @aralroca , we can say I took my time on this one 😄 I'm still using that function in one of my projects and I'm currently importing it like this:
with this in a
This works but is not typed... |
What version of this package are you using?
next-translate@1.6.0
What problem do you want to solve?
I'm using
next-translate
to translate emails built with Mailing. Unfortunately, this does not allow me to user react context. This is why I rely ongetT
to provide aTranslate
function to my components.It works well but I also need to translate texts including HTML tags. But unfortunately,
Trans
component relies on context so it does not work for me.What do you think is the correct solution to this problem?
Either allow me to pass
Translate
function toTrans
component so that it does not rely onuseTranslation
.Or, simply expose
formatElements
so that I can use it directly.Are you willing to submit a pull request to implement this change?
Yes
The text was updated successfully, but these errors were encountered: