Giter Club home page Giter Club logo

Comments (4)

jasonmit avatar jasonmit commented on May 23, 2024

@siddo420 it works in the browser -- it's just not registered on bower. You can always pull it in over git if you choose to not use npm over bower.

bower install [email protected]:yahoo/handlebars-intl.git

from handlebars-intl.

siddo420 avatar siddo420 commented on May 23, 2024

Thanks. I installed it using

bower install --save https://github.com/yahoo/handlebars-intl.git

Can you give an example of how to use it in Node? I have patched Node.js, installed relevant modules etc. But, I am not sure how to use it now.

I wanted to use it for error messages initially. For example, I have directory structure like below:

templates/en-US/errors/error1.hbs
templates/en-US/errors/error2.hbs
templates/fr-FR/errors/error1.hbs
templates/fr-FR/errors/error2.hbs

What is the best way to use them in my Node.js code? Also, can it be easily used with ConsolidateJS?

from handlebars-intl.

jasonmit avatar jasonmit commented on May 23, 2024

The documentation on the website covers the instructions: http://formatjs.io/handlebars

Also, can it be easily used with ConsolidateJS?

Report back on your findings.

from handlebars-intl.

siddo420 avatar siddo420 commented on May 23, 2024

I had read that page already but it does not explain my particular case (I guess).

I couldn't easily use it with ConsolidateJS because I wanted to use pre-compiled handlebar templates. There is a way to get the handlebars object thru consolidate but it was throwing errors for some reason.

I managed to somehow make it work with lots of hacking :)

from handlebars-intl.

Related Issues (20)

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.