Code Monkey home page Code Monkey logo

hapi-i18next's People

Contributors

bkoval avatar kenkouot avatar lizlux avatar pnre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

hapi-i18next's Issues

Questions/Issues regarding t.js

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

Possible to use with locize?

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?

Work around / document impossibility to use template inclusion

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.