I am getting an undefined variable name using i18next with handlebars
Following is my code to init i18next with this package:
const i18next = require('i18next');
const HandlebarsI18n = require("handlebars-i18n");
import resources from "./i18n/messages";
i18next.init({
resources,
debug: true,
fallbackLng: "en",
lng : "en"
});
HandlebarsI18n.init();
export default i18next;
In my index.ts where I have the handlebars compiled I have
import "./i18n"
Where I use the i18next looks like this:
<span class="typography-h3">{{__ getNodeLabel .}}{{#if attributes.required}}
<span class="required-indicator">*</span>{{/if}}
</span>
If I replace the {{__ getNodeLabel .}}
with something like {{__ "Password"}}
I still get undefined not to sure what is up.