REPOST: fallback layout mechanism

Sorry for reposting but as I got no reply so far so I am just coming
to try my luck again.

I am doing a multi-lingual website which might have several layout
pages (language dependent)available. I want to do a mechanism to fall
back from one language to another default language if such layout
is missing. Any chance I can do an is_exist check on the layout? With
my current code I really want to just check it instead of catching a
MissingTemplate error.

only thing i see would be to do a simple File.exist?(file_name) on the

but i would avoid to do this, that's more of an organizational problem
to me, to make sure a language is fully implemented or not. if not, then
don't show it

or keep a hash with 'allowed' languages somewhere
:en => true,
:fr => true,
:de => false etc.

this would depend on how many other parts of your site (views,
db-entries...) need to provide a translation.

you mean to say u want to check for the layout file exist or not?

Hmmm... looks good, but any chance if there is a non-default path for
views/layouts? I think it would be great if I could just have a
is_template_exist somewhere in the framework.

There are many websites would only implement a localized version for
certain page (like a company overview) and then skip the others, its
more a use case issue than a design issue I guess...

I was wondering about this same thing in terms of having a simple
"theme engine" of sorts. You could add "themes" to an app simply by
having an override ability. So, if a file existed in /themes/users/
index.html.erb it could be set to override the one in /app/views/users/

Hmm... perhaps this would do the trick?