Forum: Rails I18n Advice for image folders in an i18n app

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
1cee0a9c7789c89ff05d3a019617ff08?d=identicon&s=25 Max W. (max-williams)
on 2010-01-31 22:42
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
  - all the images with no text
  - english specific images
  - 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.
This topic is locked and can not be replied to.