I would have to say this is one of the best types of examples for MVC architecture programming. By having a view subdirectory for each language, you would be able to look for the correct template file(s) to call based on that user's preference.

I notice, however, that you mention BerkeleyDB. Does this mean that a lot of your site is dynamic content? If so, where does this information come from? Are you trying to translate that content as well, or only the static portions of your page?

By having the majority of the output of your program defined within template files, you could solve most of your problems by only duplicating these. This will save on the mod_perl memory load. However, if your packages are the ones actually outputting the html, perhaps it is time to look at how that is done. After all, this sounds like a large change to your application. What better time to re-examine the structure of your application and see if it truly is still the best for what you are trying to do?

Either way, simply adding PM files for each language does not seem to be the best solution to this problem. As you have already pointed out, the scalability factor just isn't there. Good luck, and I'd be happy to explain any of this in more detail if you like.

Update: I am looking for links to help you out. There was an excellent discussion about what MVC really is about and how to implement it. I would definitely recommend reading through that.


In reply to Re: Multi-language web app by thedoe
in thread Multi-language web app by diego_de_lima

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.