Forum: Rails I18n localizing images...

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Jeba M. (Guest)
on 2009-02-17 14:24
Hi,
I'm using rails 2.2.2 and i18n for localization...
I want to know...how do I localize the text which are a part of
images..???
Currently I'm offering English and German as the language options..
I have made exact copies of all the images with german text...
How do I use these images...when locale=german????
Do I use 'if' statement each time and use english/german images
accordingly???
Or is there a better way????
Thank You...
Simone R. (Guest)
on 2009-03-19 01:06
Jeba M. wrote:
> Hi,
> I'm using rails 2.2.2 and i18n for localization...
> I want to know...how do I localize the text which are a part of
> images..???
> Currently I'm offering English and German as the language options..
> I have made exact copies of all the images with german text...
> How do I use these images...when locale=german????
> Do I use 'if' statement each time and use english/german images
> accordingly???
> Or is there a better way????
> Thank You...

I dont know ruby (i'm a newbie here) but generally I solve using a
naming composition on images like locale+imagename.jpg
or a better images/locale/imagename.jpg


or better again and a fully "RUBY WAY" just watch
this video

http://content.newrelic.com/videos/01-ScalingRails...

on that video is explained how to use Content Delivery Network for
serving images and video from the right server (a germa server for germa
users , a french server for french users and so on)
This topic is locked and can not be replied to.