[sword-devel] i18n of sword website

sword-devel@crosswire.org sword-devel@crosswire.org
Tue, 25 Feb 2003 13:12:52 -0500

I could provide some technolgy to dyanmically display different languages and seperate the text data from the html structure. Localization for HTML is always the headache. However, that is based on JavaScript and DOM Level 1. Not sure that will help if we cannot use client side JavaScript.

There are mainly four options for HTML localizability
1. put text data into JS and build the content dynamically through JavaScript and DOM on the client side. As many people express, that seems not an idea people welcome.
2. Use a CGI/JSP/PHP to generate the content dynamically from the server side. Read those localized text from a database. Basically that is what the gettext does that you are looking at. The problem is the performance is bad in general since you need to generate the content everytime people try to access the page. 
3. Translate those html into a different languages completely and put them into different directory with a standard naming conviention. This is the lazy man localization approach. It work if you only produce the English content once and never need to change it again. It will be your nightmare if you ever modify the content. Keep different langauges in sync will be a nightmare in this approach. Highly discourage.
4. Modify 2 and make the content generation happen in a "build" time and keep the "source" similar to what you have in 2. So, every night, you have a cron process which will read the data base and update the HTML pages. This make it semi dynamic, flexable to change, but will not cause  the loading performance. I believe Yahoo use this type of work for their directory. Basically the content is dynamically generated, but not by the user of the browser, but by the content author to triger the update process. 

I am in favor of 4. That mean ou need to write c or perl or other code to generate html pages into different directory. And you need to run that process every so often. You keep the modification to the source of that process and your user only read the generated content.