We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm using express, express-handlebars and handlebars-intl and I would like to change the default "en" locale to another (like "it").
express
express-handlebars
handlebars-intl
I read that this plugin uses Intl.DateTimeFormat to formats. In this specific case how can I edit things like locale, timezone, date formats, etc..
Intl.DateTimeFormat
const hbs = exphbs.create({ extname: '.hbs' }); app.engine(hbs.extname, hbs.engine); HandlebarsIntl.registerWith(hbs.handlebars); // Handlebars Intl Plugin app.set('view engine', hbs.extname); app.set('views', path.join(__dirname, './views/pages'));
Final goal:
Correctly renders with Handlebars this datetime {{formatDate time}} using my specified locale
{{formatDate time}}
The text was updated successfully, but these errors were encountered:
Just tried:
global.HandlebarsIntl = HandlebarsIntl; require('handlebars-intl/dist/locale-data/it');
or even:
HandlebarsIntl.__addLocaleData({locale: "it"})
No errors but does not works, what am I missing? :\
Sorry, something went wrong.
same issue
No branches or pull requests
I'm using
express
,express-handlebars
andhandlebars-intl
and I would like to change the default "en" locale to another (like "it").I read that this plugin uses
Intl.DateTimeFormat
to formats. In this specific case how can I edit things like locale, timezone, date formats, etc..Final goal:
Correctly renders with Handlebars this datetime
{{formatDate time}}
using my specified localeThe text was updated successfully, but these errors were encountered: