Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best way to translate languages in multiple XML files in multiple dire

Status
Not open for further replies.

comdol2

Programmer
Aug 14, 2008
1
US
Hello.

I need to translate English in 300 XML files in 50 directories to French( and other 5 languages ). Yes. This is a kind of multi-dimentional work. I know there is XPATH to make it possible but my situation is that one guy who is not a programmer is able to translate all english to his language whenever he wants. When he finish it, I get that file and rebuild the service and release it. So dealing directly with this xml files is very difficult because he is not a programmer.

I was thinking to make any admin tool to make this but I don't want to do it because there should be a maintenance issue.
I am the only person to handle this one technically and I have a lot of work to do now so I don't want to add any addition burden to me.

So I'm thinking if XML can make it possible to pick a specific line in a external text file(or any other files: py, php, and so on) it would be great.

For example
Let's call the external text file as "Localizer.txt" and XML file as "data.xml"

data.xml :
<calendar>
<month>
<jan>JAN</jan>
<feb>FEB</feb>
<mar>MAR</mar>
......
</month>
</calendar>

Localizer_FR.txt (for franch) :
JAN : Janvier
FEB : Février
MAR : Mars
.....

For January, I want to make XML pick "Janvier" in Localizer_FR.txt automatically according its language setting ( in this case lang=FR )

I know in XML there is a language variable(XPATH) and I can make a similar one
<jan lang="euc-EN">January</jan>
<jan lang="euc-FR">Janvier</jan>
something like that but I don't want this because there are 300 XML files in 50 directories.

I want to maintain language translation in one txt file and make XML see that file.

Please give me any of your advice/suggestion for my situation.

Thanks a lot.
 
>I want to maintain language translation in one txt file and make XML see that file.
That is not a very clever move. Instead, you should approach like this.
[tt]<paraphrase>I want to maintain language translation in one/mulitple xml document(s) and make XSL see that file(s).</paraphrase>[/tt]

For simple glossary type translation, it is some kind of dictionary or lookup table.

For paragraph/article type of translation, the approach is basically similar, just direct the paragraph/article to the language-specific uri and make that uri properly xml formed by wrapping the content in a wrapper-root tag. This is an article summarising the logical approaches with (downloadable) samples.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top