saeed_violinist Posted April 17, 2009 Share Posted April 17, 2009 Dear Friends, I need some sort of baisc information about designing a dual language website, what is the best approach? haveing 2 different databases for each language? please share your ideas. Thanks. Quote Link to comment Share on other sites More sharing options...
jackpf Posted April 17, 2009 Share Posted April 17, 2009 Hmm...you could just have two tables, each with all your pages stored in it, but in different languages. The client could then choose their language, which sets a cookie. If the cookie is one language or doesn't exist, do a language, if it does, do the other. Just a suggestion. However...storing pages ina database is a bit risky. Databases are a lot easier to hack than flat files. Quote Link to comment Share on other sites More sharing options...
Adam Posted April 17, 2009 Share Posted April 17, 2009 storing pages ina database is a bit risky. Databases are a lot easier to hack than flat files. Risky? Not really, if you know what you're doing and secure your system... SMARTY templates allow you to add in multi-lingual support, not by default but there are classes available you can add to give that support. We use it at work and our website is available in about 10 languages, I have no complaints. Generally the idea is in your templates you encase text in translation tags, something like {t}hello{/t}, and then the translations are looked up from an XML file or ".po" file. Definitely beats having several versions of the same file... Regards Quote Link to comment Share on other sites More sharing options...
jackpf Posted April 17, 2009 Share Posted April 17, 2009 Well...I'd say it is more risky than conventional methods of storing pages; ie, in a file. But yeah, that sounds like a good idea actually. Didn't know that existed. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.