# Localizing images

**URL:** <https://www.ruby-forum.com/t/localizing-images/160525>\
**Category:** Rails I18n\
**Created:** [February 17, 2009, 1:24pm UTC](https://www.ruby-forum.com/t/localizing-images/160525 "2009-02-17T13:24:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zeba-momin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/8e7dd6/32.png) [@zeba-momin](https://www.ruby-forum.com/u/zeba-momin)\
**Post date:** [February 17, 2009, 1:24pm UTC](https://www.ruby-forum.com/t/localizing-images/160525/1 "2009-02-17T13:24:31Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![zeba-momin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/8e7dd6/32.png) [@zeba-momin](https://www.ruby-forum.com/u/zeba-momin)\
**Post date:** [March 19, 2009, 12:06am UTC](https://www.ruby-forum.com/t/localizing-images/160525/2 "2009-03-19T00:06:43Z")

</div>

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-Page-Responsiveness.mp4](http://content.newrelic.com/videos/01-ScalingRails-Page-Responsiveness.mp4)

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)
