# Add a new locale using raul's translate\_routes plug-in

**URL:** <https://www.ruby-forum.com/t/add-a-new-locale-using-rauls-translate-routes-plug-in/171552>\
**Category:** Rails\
**Created:** [July 5, 2009, 1:55am UTC](https://www.ruby-forum.com/t/add-a-new-locale-using-rauls-translate-routes-plug-in/171552 "2009-07-05T01:55:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Great\_Kindness](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/278dde/32.png) [@Great\_Kindness](https://www.ruby-forum.com/u/Great_Kindness)\
**Post date:** [July 5, 2009, 1:55am UTC](https://www.ruby-forum.com/t/add-a-new-locale-using-rauls-translate-routes-plug-in/171552/1 "2009-07-05T01:55:51Z")

</div>

I just started using Raul M.'s translate\_routes plug-in. It’s  
great. Now what I can’t understand is how to add a new locale (in my  
case, French). I figured that I could just add a new section to my  
translation file (text.yml). I appended the following to the text.yml  
file:

fr:  
back: retourner

Then in my application layout (which I copied from Raul’s demo  
application), I changed the code from:

\<%= I18n.locale == ‘es’ ? link\_to(‘en’, :locale =\> ‘en’) : link\_to  
(‘es’, :locale =\> ‘es’) %\>

to:

\<%= I18n.locale == ‘fr’ ? link\_to(‘en’, :locale =\> ‘en’) : link\_to  
(‘fr’, :locale =\> ‘fr’) %\>

When I run my application, I get this error:

No route matches {:action=\>“index”, :locale=\>“fr”}

So, I’m guess I’ve got to make a change somewhere else for the  
application to recognize this new route. What am I missing?
