Hi,

I18n.locale holds the current locale.
I guess all you want to do is have different url:s to the videos, based on
locale, so alternatively you can put the url in the translations with a
translation key such as "video_url". Then you won't need the conditional in
your view. Translation strings don't have to be text shown to the user.

- Martin


On Fri, May 31, 2013 at 8:17 PM, Israel T. <[email protected]> wrote:

> Hi,
>
> I'm new in RoR and I need to write an if in a view to show a different
> video based in the current language.
>
> How can I get the current chosen locale?
>
> Thanks
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups
> "rails-i18n" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/rails-i18n?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"rails-i18n" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rails-i18n?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to