>>>>From: Paul Novitski <[EMAIL PROTECTED]> >>>>Every bilingual page on the site contains both languages, with >>>>only one of them displayed at a time. >>>> >>>>In the absence of javascript, the Japanese/English toggle >>>>requests the current page from the server with the requested >>>>language selected (by specifying it in the body class). >>>> >>>>With javascript enabled, the language toggle simply switches the >>>>body class and the displayed language changes immediately.
>>At 3/5/2007 06:28 PM, Chris Chen wrote: >>>Could you elaborate a bit on what you mean by "switch body class" >>>with a simple example? >Paul Novitski wrote: >>Here's one example of this technique. Plug the requested language >>into the body class: >> <body class="langEN"> >>or >> <body class="langES"> At 3/6/2007 01:08 PM, Erik Visser wrote: >so for every language you have a seperate html file? No. I suppose that's a possible approach, but I never work like that. Most of the time I keep variable content in an SQL database and merge it with a template (providing the additional advantage of making it easy for a non-technical client to modify the text without mucking with the layout and styling). In any event I wouldn't maintain two marked up pages with different language text unless there were some overriding reason -- such as two languages being so different that they require different markup -- although, again, I'd still be inclined to keep the text in the database and merge it with two separate templates. If a round-trip to the server is used to switch language, each downloaded page instance can contain just one language. If you want to be able to switch language instantly, you have to download all texts in a single page and toggle between them dynamically. This would obviously get sluggish with long texts or a large number of languages. Although it's fun to be able to switch languages instantly, most multilingual sites don't require such immediate response time. Once a visitor selects their preferred language they tend to stay there. Downloading multiple texts when only one is needed seems needlessly inefficient. It might make a lot of sense in a language training website, for example, when the visitor can switch back and forth rapidly to check their own translation of a text with the one offered. Regards, Paul __________________________ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7 information -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/