Localized XML file

S

shapper

Hello,

I creating xml files to hold localized resources such as posts,
documents, contents, etc.

For example, a post contains the following fields:
PostID, PostTitle, PostBody, PostCreatedDate, PostUpdatedDate and
PostIsPublished

Localized Columns:
PostTitle and PostBody

NO Localized columns:
PostID, PostCreatedDate, PostUpdatedDate and PostIsPublished

What is the best way to create a XML file structure to hold posts?

I always use SQL databases but in this project I need to use XML files
that I am not so used to ...

Could someone help me out with this?

Thanks,
Miguel
 
S

shapper

Hello,

I creating xml files to hold localized resources such as posts,
documents, contents, etc.

For example, a post contains the following fields:
PostID, PostTitle, PostBody, PostCreatedDate, PostUpdatedDate and
PostIsPublished

Localized Columns:
PostTitle and PostBody

NO Localized columns:
PostID, PostCreatedDate, PostUpdatedDate and PostIsPublished

What is the best way to create a XML file structure to hold posts?

I always use SQL databases but in this project I need to use XML files
that I am not so used to ...

Could someone help me out with this?

Thanks,
Miguel

Sorry, I posted on the wrong newsgroup by mistake ...
 
S

Stefan Hoffmann

hi Miguel,
Localized Columns:
PostTitle and PostBody
What is the best way to create a XML file structure to hold posts?
This depends on your preferences: attribute centric or value centric XML.

E.g.:

<PostTitle lang="es" value="Respuesta">
<Translation lang="de">Antwort</Translation>
<Translation lang="en">Answer</Translation>
</PostTitle>

or

<PostTitle lang="es" value="Respuesta">
<Translations>
<Translation lang="de">Antwort</Translation>
<Translation lang="en">Answer</Translation>
</Translations>
</PostTitle>

or<PostTitle>
<Value lang="es" value="Respuesta">
<Translation lang="de">Antwort</Translation>
<Translation lang="en">Answer</Translation>
</PostTitle>

or

<PostTitle>
<Value>Respuesta</Value>
<Language>es</Language>
<Translations>
<Translation lang="de">Antwort</Translation>
<Translation lang="en">Answer</Translation>
</Translations>
</PostTitle>

or

<PostTitle>
<Value>Respuesta</Value>
<Language>es</Language>
<Translations>
<Translation>
<Value>Antwort</Value>
<Language>de</Language>
</Translation>
</Translations>
</PostTitle>

btw, the lang="" attribute is a predefined universal attribute, thus the
abbreviation.


mfG
--> stefan <--
 
L

Larry Smith

Hello,
I creating xml files to hold localized resources such as posts,
documents, contents, etc.

For example, a post contains the following fields:
PostID, PostTitle, PostBody, PostCreatedDate, PostUpdatedDate and
PostIsPublished

Localized Columns:
PostTitle and PostBody

NO Localized columns:
PostID, PostCreatedDate, PostUpdatedDate and PostIsPublished

What is the best way to create a XML file structure to hold posts?

I always use SQL databases but in this project I need to use XML files
that I am not so used to ...

Could someone help me out with this?

Not sure if this will help you (depending on your needs) but ".resx" files
are normally the way to store localizable resources (these are xml files).
There's a lot of built-in support for this. Google for terms like ".resx",
"localization", "satellite assemblies".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top