On 9 Jan., 00:16, Sven Fuchs <[email protected]> wrote:
> I've just added available_locales to
> I18nhttp://github.com/svenfuchs/i18n/commit/411f8fe7c8f3f89e9b6b921fa62ed...
:
> I assume there are no objections anyway? Otherwise, speak up now :)
Nice. I'm glad that it got included in the end - I was about to
suggest something similar to list available locales :-). Not only for
upcoming translated views - I found a few other use cases where this
method becomes handy (posted a few in
http://zargony.com/2009/01/09/selecting-the-locale-for-a-request).
How about another small method like the following:
def locale_exists? (locale)
available_locales.include?(locale.to_sym)
end
regards,
Andreas Neuhaus
http://zargony.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"rails-i18n" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rails-i18n?hl=en
-~----------~----~----~----~------~----~------~--~---