# Advice for image folders in an i18n app

**URL:** <https://www.ruby-forum.com/t/advice-for-image-folders-in-an-i18n-app/182645>\
**Category:** Rails I18n\
**Created:** [January 31, 2010, 10:42pm UTC](https://www.ruby-forum.com/t/advice-for-image-folders-in-an-i18n-app/182645 "2010-01-31T22:42:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmaxvv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/85f322/32.png) [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Post date:** [January 31, 2010, 10:42pm UTC](https://www.ruby-forum.com/t/advice-for-image-folders-in-an-i18n-app/182645/1 "2010-01-31T22:42:46Z")

</div>

Hey all. I’m starting my first i18n app and pondering how to organise  
my images and stylesheets. I can think of a couple of ways but thought  
that this problem has probably already been solved many times by people  
much more experienced than me. Here’s what i have so far anyway, i’m  
grateful for any advice.

option 1 - complete duplication.

english images in /images/en  
german images in /images/de

all images, even the ones that don’t have any text in them, are saved in  
every folder.

stylesheets are also duplicated, so you load eg  
/stylesheets/en/admin.css and that points to images in /images/en

To deal with this duplication i’d probably have a master folder  
containing all the images that are the same in all languages, and a  
master stylesheet, and then a script to copy images to the various  
localised folders and to duplicate the stylesheets around, gsubbing (eg)  
/images/locale to /images/en or whatever.

This seems very complicated but in terms of what each user can see it’s  
pretty easy to get your head around.

option 2 - shared global folder and localised folders.  
have a structure like  
/images/global

- all the images with no text  
/images/en
- english specific images  
/images/de
- german specific

This is harder to deal with from a stylesheet point of view, although  
again i could have a script which copies a master stylesheet to various  
localised versions with ‘locale’ replaced by the actual locale.
