i18n-node
i18n-node copied to clipboard
I can't handle nested translations without sprintf
Hi!
I'm trying to get the translation for the copyright
key in this nested object:
"app": {
"name": "Administration tool",
"companyName": "Sirena",
"description": "Get access to all the administrative tools",
"copyright": "{{app.companyName}} © {{year}}"
},
The problem that I have is that I don't know how to get the copyright translation with the app.companyName translated (something like what this other module does: http://i18next.com/translate/nesting/)
Is there a way to do that with i18n-node?
Thanks!
nested backreferences are not supported out-of-the-box. But you might implement that with a little effort by using https://github.com/mashpie/i18n-node#i18ngetcatalog to fetch all translations combined with mustache or sprintf (https://github.com/mashpie/i18n-node#mustache-support).
I am sorry to hear that...