We need to implement a multi-language content MMBase site. As the MultiLanguage 
project has been frozen, I contacted Nico at Finalist, who provided me with 
some alternatives. He suggested to either

1. Add an i18n-table to the database - this would require a core change (Nico 
told me about a quickfix that queries the database directly, but I'm not in 
favor of that)
2. Add extra fields to the builder (e.g. en_title, nl_title, fr_title instead 
of title) - requires quiate elaborate configuration for each website deployed.
3. Use XML instead of plain text as field content


Since we do not want to interfere with core development and would like to be 
able to support i18n as an add-on instead of a key feature, the XML-option 
seems to us to be the most viable one. Our suggested approach is as follows:

1. Add defaultLocale and supportedLocales to web.xml (or, if preferred by the 
community, to a properties file within the jar containing the i18n add-on code)

2. Adjust an editor to display all fields of a node locale-relative (e.g. use a 
Tab-like presentation for each supported locale)

3. Have the editor POST to a servlet that transforms the multi-value inputs to 
xml-snippets like this:
   <i18n>
     <content language="nl">Dit is nieuws</content>
     <content language="en">This is news</content>
     <content language="fr">Je ne sais quoi</content>
   </i18n>
   and sets these snippets as the field content of the node. Core functionality 
will be used to store and/or retrieve the node.

4. Write some extra tags in order to provide front-end localization. These 
would preferably be the same as the standard tags, with an extra parameter 
'locale'. The locale param will be used to correctly transform the xml snippet 
to a localized string.

5. Precompile the editor jsp files and the servlet and helper files.

6. Deliver an i18n.jar and a web.xml.snippet file - by putting the jar into 
WEB-INF and copying the servlet defenitions and mappings from web.xml.snippet 
into web.xml, content localization will be available without any interference 
with core functionality.

We think this can be realised without investing too much time, as it only 
requires some editor and tag tweaks. We could start a Proof of Concept this 
week, so your suggestions/remarks are more than welcome.

Regards,

Wouter

_______________________________________________
Developers mailing list
[EMAIL PROTECTED]
http://lists.mmbase.org/mailman/listinfo/developers

Reply via email to