dealing with very long static text

6 views
Skip to first unread message

cedric

unread,
Oct 9, 2009, 6:04:34 PM10/9/09
to rails-i18n
what is the general recommendation for dealing with very long static
copy? for example, a privacy policy or terms of service seems a bit
unwieldy to be sticking into a yaml file. any best practices here to
recommend?

Yoan Blanc

unread,
Oct 10, 2009, 5:17:50 AM10/10/09
to rails...@googlegroups.com
Try using the localized viezs:

http://guides.rubyonrails.org/i18n.html#localized-views

policy.en.html.erb
policy.es.html.erb
...

--
Yoan

2009/10/10 cedric <cedri...@gmail.com>:

Hans Marmolin

unread,
Oct 14, 2009, 3:24:11 AM10/14/09
to rails-i18n
Hi
I tried the localized views but it did not work for me !!!!!
I have a view about.html.erb and added the view about.sv.html.erb to
display a swedish template
I have a locale sv.yml that starts with sv:
However, the about.sv.html.erb is not displayed when I set the
language to swedish, and the textmate editor does not recognize it as
a html file
Why doesn't it work ?
Do I have to define availabel locale myself ?
DO I have to set somethin in the configuration file ?

On 10 Okt, 11:17, Yoan Blanc <yoan.bl...@gmail.com> wrote:
> Try using the localized viezs:
>
> http://guides.rubyonrails.org/i18n.html#localized-views
>
> policy.en.html.erb
> policy.es.html.erb
> ...
>
> --
> Yoan
>
> 2009/10/10 cedric <cedric.h...@gmail.com>:

macarthy

unread,
Oct 14, 2009, 3:44:38 AM10/14/09
to rails-i18n
Hi
> I tried the localized views but it did not work for me !!!!!
> I have a view about.html.erb and added the view about.sv.html.erb to
> display a swedish template
> I have a locale sv.yml that starts with sv:
> However, the about.sv.html.erb is not displayed when I set the
> language to swedish, and the textmate editor does not recognize it as
> a html file
> Why doesn't it work ?

Should be about.html.sv.erb

> Do I have to define availabel locale myself ?

no

> DO I have to set somethin in the configuration file ?

no

Justin

(BTW Rails Lao translations coming soon !)

Hans Marmolin

unread,
Oct 14, 2009, 6:21:25 AM10/14/09
to rails...@googlegroups.com
Hi and thanks for ypur advice, but
 change to  about.html.sv.erb  
but that doent work either and  the guide says

Rails 2.3 introduces another convenient localization feature: localized views (templates). Let’s say you have a BooksController in your application. Your index action renders content in app/views/books/index.html.erb template. When you put a localized variant of this template: index.es.html.erb in the same directory, Rails will render content in this template, when the locale is set to :es.

so why doesn't it work ?
I use rails 2.3.3 
____________________________________________
Hans Marmolin
Prof Cognitive Ergonomics
St: Larsgatan 50, 58224 Linköping, Sweden





Reply all
Reply to author
Forward
0 new messages