Closed jorgenhorstink closed 12 years ago
I think that'd probably be a bad idea. I've prototyped my ideal solution for using icu messageformat inside of hbs templates, but its not fully fleshed out.
You'll probably want to use a real i18n formatting DSL like my message format.js
Then to see what I've prototyped, check out https://github.com/SlexAxton/messageform.at/blob/master/dev/template/create.hbs
Which uses a modified hbs.js file and ast i18n helper. It compiles the inline templates and writes them out into modules.
Hopefully that helps!
Hi,
I'd like to use handlebars variables within the i18n template string;
To make this possible, you'd have to compile the Handlebar template twice, and provide it with the same context.
I made this change to line 387 of the hbs.js file;
What do you think of this approach, and what is the impact on performance?
regards, Jorgen