PDA

View Full Version : Grid for creating Multi-language XML



rsanches
13 Nov 2006, 7:02 AM
Hi! First of all i want to congratulate you for your nice site :wink:

I have a XML that do internacionalization for a cms that i'm building. I would like to ask: what is the better grid structure to edit this XML.

The XML, for example, has this structure:



<languages>
<language>
<TOP_HOME>Home</TOP_HOME>
<TOP_VIEW>View</TOP_VIEW>
<TOP_LISTOFPAGES>List of pages</TOP_LISTOFPAGES>
<TOP_LISTOFTEMPLATES>List of templates</TOP_LISTOFTEMPLATES>
<TOP_NEW>New</TOP_NEW>
<TOP_CLOSE>Close</TOP_CLOSE>
<TOP_PAGE>Page</TOP_PAGE>
<TOP_TEMPLATE>Template</TOP_TEMPLATE>
</language>
<language>
<TOP_HOME>Inizio</TOP_HOME>
<TOP_VIEW>Visualizza</TOP_VIEW>
<TOP_LISTOFPAGES>Lista di pagine</TOP_LISTOFPAGES>
<TOP_LISTOFTEMPLATES>Lista di templates</TOP_LISTOFTEMPLATES>
<TOP_NEW>Nuovo</TOP_NEW>
<TOP_CLOSE>Chiude</TOP_CLOSE>
<TOP_PAGE>Pagina</TOP_PAGE>
<TOP_TEMPLATE>Template</TOP_TEMPLATE>
</language>
</languages>


I've seen your CROSS BROWSER XML DATA BINDING http://www.jackslocum.com/yui/2006/10/02/exploring-client-side-cross-browser-xml-data-binding-part-1/ and i think i can use it, with textareas instead of normal text inputs.

I have also seen the built in editing support : http://www.jackslocum.com/yui/2006/09/10/adding-built-in-editing-support-to-the-yahoo-ui-extensions-grid/. And i can also use it, putting the languages as column and the tags as rows.

So, my question is also a design one: what could be the better structure for my case? Should I change the XML structure?

When I finish i'll post it on examples and extras.

Thanks a lot,
Rafael

jack.slocum
13 Nov 2006, 6:47 PM
It all depends on what you want. The editor grid is built in and requires no extra work. It also has built in validation support.

The data binding requires you to build a form and do a little work and doesn't support native validation but in the end is more flexible in the types of data it can edit.