Forum: Rails I18n Rails 3.1 list of supported locales

A6d719166aa0b35ca2571013f8d79219?d=identicon&s=25 vhochstein (Guest)
on 2011-06-25 00:20
(Received via mailing list)
Hi,

1. What s the best way to get a list of all supported locales in a
rails 3.1 app?
2. What s the best way to iterate them to generate javascript code for
each locale using corresponding translations?

Thanks a lot in advance..
Volker
42ec9fd08c179b547dcb60d977e29941?d=identicon&s=25 Iain Hecker (Guest)
on 2011-06-25 08:58
(Received via mailing list)
Hi Volker,

There is no real limit to which locales are supported, you can create
your own if you like. A good list of pre-made translations for rails
are available at: https://github.com/svenfuchs/rails-i18n

You can get a list of all locales for which you have translations with
`I18n.available_locales`.

-- iain
B74644db03ee70d45b81bd775956d252?d=identicon&s=25 Eugen Ciur (eugen)
on 2011-06-25 09:26
(Received via mailing list)
Hi,

Just wanted to add to Iain answer,  that locale can be whatever come to
your
mind. For example: I18n.locale = :bonus_language_ex
just make sure your have yaml file bonus_language_ex.yml in your locale
(this is if you use simple locale).

On Sat, Jun 25, 2011 at 9:57 AM, Iain Hecker <iain@iain.nl> wrote:

>
> >
> http://groups.google.com/group/rails-i18n?hl=en.
> http://groups.google.com/group/rails-i18n?hl=en.
>
>


--
http://blog.eugen.co
A6d719166aa0b35ca2571013f8d79219?d=identicon&s=25 vhochstein (Guest)
on 2011-06-30 10:09
(Received via mailing list)
Hi,

thanks a lot will try out available_locales call.

--
Volker

My question was more like, which locales are actually supported by an
application.
This topic is locked and can not be replied to.