How to use this in html #15
Comments
If your html-loader has the interpolate query parameter: { test: /.html$/, loader: 'html?interpolate' }, Then you can write this: <div>${_("hello_world_key")}</div> Which will compile to module.exports = '<div>' + 'Hello world' + '</div>'; |
Oh, that's pretty awesome. Could this be documented? |
yes documentation would be amazing. |
How to use this in jade ? |
@Teemo12345 I want to know this too. Do you have any idea now? |
add |
can you provide an example of where to put this ? because can't figure out how to do it |
That's from my config, modules section:
|
i m using html template but when i m executing it i got this JS error on loading as i m not using pug i don't know how to apply your comment to my situation |
The question I answered was about jade/pug, not html, sorry. |
How could we use this syntax inside an html attribute? |
in the examples it is shown that it can be used in javascript like
console.log(__("hello_world_key"))
but how do we use this in the .html pages.The text was updated successfully, but these errors were encountered: