Advice for image folders in an i18n app

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 forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs