# Appending to a restful resource a custom format

**URL:** <https://www.ruby-forum.com/t/appending-to-a-restful-resource-a-custom-format/144397>\
**Category:** Rails\
**Created:** [July 29, 2008, 11:41am UTC](https://www.ruby-forum.com/t/appending-to-a-restful-resource-a-custom-format/144397 "2008-07-29T11:41:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gabriel83](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5fc32e/32.png) [@gabriel83](https://www.ruby-forum.com/u/gabriel83)\
**Post date:** [July 29, 2008, 11:41am UTC](https://www.ruby-forum.com/t/appending-to-a-restful-resource-a-custom-format/144397/1 "2008-07-29T11:41:29Z")

</div>

Hi everyone,  
I would like to add the format and a custom field to all my restful  
resources, without touching my application (I don’t want to change all  
url\_path to format\_url\_path to make things clear).

For being more specific I want to add :format.:lang to my restful  
resources, so i can have /posts/1.html.en that map to the english page  
and /posts/1.html.it that map to the italian one. the lang variable is  
setted by session or cookies.

The i18n part of my app is done, everything works. I just would like to  
have pretty urls, nice even for caching…

Thank you a lot!
