some of that depends on how you plan to do the implementation, and how clean the separation of logic and display is on the current site.
are you going to go with sp.domain.com and en.domain.com or domain.com/sp/ and domain.com/en/, or similar? either way, you could probably parse the uri or hostname in your handler.pl and set a mason global $lang to en or sp based on each request. of course that's the easy part. doing the switching at the page level is going to require some clean separation of logic and display in your mason components, or fully doubling your number of mason components. if you mostly have large chunks of text that can easily be pulled out into individual components, then one option might be a custom resolver that first looks for /path/to/component.$lang then falls back to /path/to/component. that means that you could decide how much separation you want or need in each individual circumstance. for example if needs dictate that a single page be completely different structurally in english and in spanish, you could create /foo/bar/index.html.sp and /foo/bar/index.html.en and the custom resolver would dispatch the correct page based on the value of $lang. or if there are only small changes needed, you would just have /foo/bar/index.html, and in it you would have <html> <head>...</head> <body> %# some perl logic <& /path/to/text/chunk/component, arg1=> $value1 &> %# some more perl logic </body> </html> and you would put the appropriate smaller chunks of text in /path/to/text/chunk/component.en and /path/to/text/chunk/component.sp now if you have very small chunks of text that are scattered throughout the page, then you may look into the Gettext module or similar. of course all of this is just my late-night ramblings and you should probably wait for some real-world advice from somebody that has done full-scale language switching and can give you some concrete tips. :-) good luck namotco wrote: > I have a site that now needs to be available in Spanish. I have text > in a database, in Javascript files, in perl scripts, and in HTML > files. So it's a mess and I have < 3 weeks to get this done. What > are my best options? > > Things I've thought of: > > a big hash with all the text strings and use a filter at the end of > the request before flushing the data out... (easy, might be slow? > possibly inaccurate at first) > create a duplicate site and change all the strings, including code, > that are in english (a little time consuming, harder to maintain) > rework the site to pull strings from the database in a selected > language (probably very time consuming and not efficient) > stop using text entirely (easy, but not very useful) > > Suggestions? > > Gracias, > > Ryan > > ------------------------------------------------------------------------- > SF.Net email is sponsored by: > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services > for just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > Mason-users mailing list > Mason-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mason-users ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users