Made with Slides
Pricing
Features
Teams
Log in
Sign up
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
AngularJS, Jade and i18n
1,737
Gonzalo Ruiz de Villa
gruizdevilla
Loading comments...
More from
Gonzalo Ruiz de Villa