Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#underscore-i18n-mixin

###What is this? A small snippet that overrides _.template() to support calls to a gettext() function.

###Why? I made it so that it would be easy to use django's javascript translation catalog from inside an underscore microtemplate. It is probably useful elsewhere as well.

###How do I use it? Put strings you want translated inside a tag that <%t 'looks like this' %>.

###How does it work? It is really simple. It essentially transforms your tags to look like this: <%= gettext('hey there') %> and then passes the transformed text into the original _.template() function.

About

Overrides _.template to support translation tags

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages