[Chameleon] language handling - xml??
Paul Spencer
pspencer at dmsolutions.ca
Tue Oct 19 11:25:28 EDT 2004
Liz, there are several things relating to you answer:
* dbf does have a limit of around 255 characters per field unless memos
are supported (which they aren't in php's implementation of dbf).
* the help for each widget is not in dbf files. The dbf files only
store the stuff for the UI, mostly error messages and labels for stuff
in dialog boxes.
* Chameleon help system has been changed to use a much more complete XML
document for each widget, one for each language. The HelpWidget has
been changed to EmbeddedHelp and it basically pulls out the contents of
the <OnlineHelp> tag of the appropriate widget doc/language.
* For version 2.1, I am hoping to move all the contents of the .dbf
files into a different kind of storage ... hopefully an SQLite table.
This would hopefully remove the limitations associated with dbf. This
would affect all the user-interface translation stuff but not the help
documents
* In chameleon/common/xml_utils is XMLObject.php. You include this file
then create a new XMLObject( filename ). This creates a php object
representing the structure of your xml document. You can then use
methods on the root XMLObject to search for, or go directly to, a child
object. You can also use the php xml_parse_into_struct function
directly (which is what XMLObject does) but it is a little confusing to
understand what the output is.
Cheers,
Paul
Godwin, Elizabeth wrote:
> I am considering writing a small help widget for my application that
> displays help for all the widgets I'm using. At the moment it's a very
> specialized widget that displays the info I want displayed. I suppose
> it could be made into something more dynamic... but that's for another day.
>
> In doing this, I thought it would be nice to to the language handling of
> the DBF files to handle the French vs English help descriptions. The
> problem here though is that these dbf files are limited to 256 (or
> something close) characters. If I'm mistaken on this, someone please
> share.
>
> What I'm wondering is... how hard would it be to use xml files instead?
> It would be easier then for me to store translations because there is no
> limit on characters. Is there a sample of a parsing function that comes
> with Chameleon that I could modify for use in my templates? Ideally it
> would be nice if all of Chameleon could handle more than 256 chars in
> language files, but I understand such a change would be a large
> undertaking for the present time.
>
> Cheers,
>
> Liz
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
More information about the Chameleon
mailing list