kenkouot / hapi-i18next Goto Github PK
View Code? Open in Web Editor NEWi18next integration for hapijs
License: MIT License
i18next integration for hapijs
License: MIT License
Thank you so much for writing this plugin.
There are 2 issues with t.js though or I might understand it wrong:
Shouldn't
else if (options.hasOwnProperty(key)) {
be
else if (options.hash.hasOwnProperty(key)) {
as otherwise params
will always be emtpy as no hash values are passed?
Also,
params[key] = String(options.hash[key]);
should be
params[key] = options.hash[key];
as otherwise all values are strings and as such i18next helpers that depend on numbers such as "_plural" are not supported anymore?
Mike
Hi,
I'm trying to figure out if there is a way to use this plugin for Hapi with locize backend?
As far as I understand I need to call i18n.use(Locize)
somewhere. Not sure if it's possible to call after init
call has been made by this plugin?
The Typescript dependency should be listed in devDependencies
, not dependencies
.
Hi,
Thanks for publishing this module.
As it stands, it is useful for basic layouts. However, the way the helper
is written depends on context
injection, but Hapi exposes stuff only in the root context… the first time you have a template inclusion ({{> subtemplate}}
), this
is redefined and i18n
is not accessible anymore.
The only work around I see is to always pass it around when including sub templates, but that's pretty cumbersome.
If you see a better workaround, it would be most welcome. Otherwise, a note in the documentation would be good too, to avoid wasting time if you depend on template inclusion.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.