Presentations
Templates
Features
Teams
Pricing
Log in
Sign up
Log in
Sign up
Menu
AngularJS, Jade and i18n
@gruizdevilla
Simple technique for having (pre)translated templates
Steps
Texts stored in JSON documents
Jade templates
Translated texts are accessed
with #{i18n.the.text.code}
Templates are compiled to:
template.
es
.html
template.
en
.html
...
AngularJS interceptor dynamically changes template url before loading it.
Demo
AngularJS, Jade and i18n
By Gonzalo Ruiz de Villa
Made with Slides.com
AngularJS, Jade and i18n
3,231
Gonzalo Ruiz de Villa
gruizdevilla
More from
Gonzalo Ruiz de Villa