# Create my own template language

**URL:** <https://www.ruby-forum.com/t/create-my-own-template-language/159252>\
**Category:** Rails\
**Created:** [February 2, 2009, 7:35pm UTC](https://www.ruby-forum.com/t/create-my-own-template-language/159252 "2009-02-02T19:35:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mauricio](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/90db22/32.png) [@mauricio](https://www.ruby-forum.com/u/mauricio)\
**Post date:** [February 2, 2009, 7:35pm UTC](https://www.ruby-forum.com/t/create-my-own-template-language/159252/1 "2009-02-02T19:35:14Z")

</div>

Hello guys,

I am starting to think that i need a templating language (just like  
PHP’s Smarty and JSP’s Expression Language) for simple value outputs  
in a page without resorting to \<%= %\>.

I’m working on a I18N heavy application and we have a lot of places  
where we open a scriptlet just to show a translated message and i’m  
starting to think that it would be possible to change this for a  
simpler representation, someting like ${t:txt.users.top\_by\_points}.

I want to keep the \<%= %\> functionality (so it’s more like JSP than  
Smarty), but i would like to add the other as an option, anyone has  
any idea about where i should start looking to get this to work?

- 

Maurício Linhares  
[http://alinhavado.wordpress.com/](http://alinhavado.wordpress.com/) (pt-br) | [http://blog.codevader.com/](http://blog.codevader.com/)  
(en)

---

<div class="post-metadata">

**Author:** ![mauricio](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/90db22/32.png) [@mauricio](https://www.ruby-forum.com/u/mauricio)\
**Post date:** [February 2, 2009, 7:57pm UTC](https://www.ruby-forum.com/t/create-my-own-template-language/159252/2 "2009-02-02T19:57:36Z")

</div>

Maurico -

On 2-Feb-09, at 1:34 PM, Maurício Linhares wrote:

> simpler representation, someting like ${t:txt.users.top\_by\_points}.
> 
> I want to keep the \<%= %\> functionality (so it’s more like JSP than  
> Smarty), but i would like to add the other as an option, anyone has  
> any idea about where i should start looking to get this to work?

Maybe Liquid would work for you.

[http://wiki.github.com/tobi/liquid/getting-liquid-to-work-in-rails](http://wiki.github.com/tobi/liquid/getting-liquid-to-work-in-rails)

Jodi

---

<div class="post-metadata">

**Author:** ![mauricio](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/90db22/32.png) [@mauricio](https://www.ruby-forum.com/u/mauricio)\
**Post date:** [February 2, 2009, 8:01pm UTC](https://www.ruby-forum.com/t/create-my-own-template-language/159252/3 "2009-02-02T20:01:08Z")

</div>

Liquid doesn’t accept the scriptlet ( \<%= %\> ) syntax, but thanks  
anyway.

- 

Maurício Linhares  
[http://alinhavado.wordpress.com/](http://alinhavado.wordpress.com/) (pt-br) | [http://blog.codevader.com/](http://blog.codevader.com/)  
(en)
