Didn't notice this one :

>From what I could see :

Magesh use a resource bundle, whereas I use a
set of xml files to translate in multiple langs.

The interface in Translator should help to use 
SQL/Properties implementations, making use of Magesh
code for example.

Here is an example of source file to be translated,
taken from Apache HTTPD server :

I attached build.xml, index.html (nota the __LANG__
and __TRANS(xxx)__ tokens), index_en.html and dico1.xml.

Thanks for comments

-
Henri Gomez                 ___[_]____
EMAIL : [EMAIL PROTECTED]        (. .)                     
PGP KEY : 697ECEDD    ...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 



>-----Original Message-----
>From: Conor MacNeill [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, April 30, 2002 12:28 PM
>To: Ant Developers List
>Subject: Re: Translator Task Proposal ?
>
>
>GOMEZ Henri wrote:
>
>> Did someone take a look at my Translator Task ?
>> 
>
>
>Henri,
>
>I haven't had a chance. I do know, however, that Magesh added 
>a translate task a 
>little earlier.
>
>http://cvs.apache.org/viewcvs/~checkout~/jakarta-ant/docs/manua
>l/OptionalTasks/translate.html?rev=1.5&content-type=text/html
>
>Does it do something similar to yours? (I haven't looked into either).
>
>Conor
>
>
>
>--
>To unsubscribe, e-mail:   
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
><mailto:[EMAIL PROTECTED]>
>
>
<?xml version="1.0" ?>

<project name="test_trans" default="main" basedir=".">

  <description>Test Translator</description>
  
  <path id="translator" >
	<pathelement location="."/>
  </path>

  <taskdef name="translator" classname="org.apache.translator.ant.Translator"/>

  <target name="main" >

	<!-- Translator task -->
	
	<!-- src/dst 
	
		 like any others Matching task 
	-->
	
	<!-- init parms
	
		  not used today with XML files, but could be used
		  one day as a jdbc driver declaration if we implements
		  a translate implementation using JDBC
	-->
	
	<!-- 
		dicts (list of dictionaries to be loaded) 
	
		today a list of xml files, but may be later a 
		list of properties files, or SQL database/table
	-->
	
	<!-- extension to be used :
	
		The destination files will be in form :
		
		_lang : index.html -> index_it.html	(� la properties)
		+lang : index.html -> index.html.it	(� la Apache httpd)
	
	-->
	
	<!-- langs 
	
		list of langs into which should be translated source files
	-->

	<!-- rootdomain 
	
		The main domain (dictionary), where the translator will
		search for translate item if none found in the current one.
		There could be only one root domain
	-->
	
	<!-- verbose
	
		 verbose mode 
	-->
	
	<!-- not found token 
	
		 what token should be returned when a translated value
		 couldn't be found. 
		 
		 If notfoundtoken is empty, the original search
		 value will be returned (ie: __TRANS(antforever)__).
		 
		 Having such original search value returned in output
		 files, will help you fix the dictionaries
	-->
	  
	<translator src="./src" dest="./dst" 
				includes="**/*.html"
				init="" 
				dicts="./dict/root.xml,./dict/dico1.xml,./dict/dico2.xml"
				extmode="_lang"
				langs="fr,de,it,en" 
				rootdomain="root"
				verbose="true"
				notfoundtoken="@UNK@" />
				
  </target>

</project>
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!-- <!DOCTYPE TranslatorDict SYSTEM "translator.dtd"> -->
<TranslatorDict VERSION="20020226" DOMAIN="index" ORIGIN="fr" >
  
  <TransItem ID="title.id"> 
	<TransEntry LANG="DE">Testseite fuer die Apache-Installation auf dieser Web Site</TransEntry>
    <TransEntry LANG="EN">Test Page for Apache Installation</TransEntry>
	<TransEntry LANG="FR">Page de test de l'installation d'Apache</TransEntry>
	<TransEntry LANG="IT">Pagina di prova dell'installazione di un sito Web con Apache</TransEntry>
  </TransItem>
  			 
  <TransItem ID="success.id">
	<TransEntry LANG="DE">Es klappt! Der Apache Web-Server ist auf dieser Web-Site installiert!</TransEntry>
	<TransEntry LANG="EN">If you can see this, it means that the installation of the Apache web server software on this system was successful.</TransEntry>
	<TransEntry LANG="FR">Si vous lisez cette page, c'est que les propri�taires de ce domaine viennent d'installer le serveur web Apache avec succ�s.</TransEntry>
	<TransEntry LANG="IT">Funziona! Il Server Web Apache � stato installato su questo sito Web!</TransEntry>
  </TransItem>

  <TransItem ID="addstuff.id">
	<TransEntry LANG="DE">Jetzt muss noch der richtige Web-Inhalt zugef�gt und diese Platzhalter-Seite ersetzt werden (oder der Web-Server f�r den Zugriff auf den richtigen Inhalt umkonfiguriert werden).</TransEntry>
	<TransEntry LANG="EN">You may now add content to this directory and replace this page.</TransEntry>
	<TransEntry LANG="FR">Ils doivent maintenant ajouter du contenu � ce r�pertoire et remplacer cette page, ou bien faire pointer le serveur vers l'endroit o� se trouve le contenu r�el du site.</TransEntry>
	<TransEntry LANG="IT">Ora � necessario aggiungere il vostro materiale in questa directory e sostituire questa pagina di prova, oppure configurare il server per far riferimento al vostro materiale se collocato altrove.</TransEntry>
  </TransItem>
	
  <TransItem ID="badcontent.id">
	<TransEntry LANG="DE">Wenn Sie diese Seite an Stelle einer anderen erwarteten Web-Site sehen sollten?</TransEntry>
	<TransEntry LANG="EN">Seeing this instead of the website you expected?</TransEntry>
	<TransEntry LANG="FR">Vous voyez cette page au lieu du site attendu?</TransEntry>
	<TransEntry LANG="IT">Se state vedendo questa pagina invece del sito che pensavate?</TransEntry>
  </TransItem>

  <TransItem ID="contactadmin.id">
	<TransEntry LANG="DE">dann nehmen Sie bitte Kontakt mit dem Eigent�mer dieser Site auf</TransEntry>
	<TransEntry LANG="EN">This page is here because the site administrator has changed the configuration of this web server. Please contact the person responsible for maintaining this server with questions.</TransEntry>
	<TransEntry LANG="FR">Vous voyez cette page parce que l'administrateur du site a modifi� la configuration de ce serveur Web. Veuillez contacter l'administrateur du site concern�.</TransEntry>
	<TransEntry LANG="IT">vi preghiamo di contattare l'amministratore del sito in questione.</TransEntry>
  </TransItem>

  <TransItem ID="asfreserve.id">
	<TransEntry LANG="DE">Obwohl der Eigent�mer dieser Dom�ne die Apache Web-Server Software verwendet, hat diese Web-Site ziemlich sicher keinerlei Verbindung mit der Apache Software Foundation (die diese Software kostenlos vertreibt). Es besteht also keinerlei Veranlassung, eine EMail an die Entwickler der Software zu senden.</TransEntry>
	<TransEntry LANG="EN">The Apache Software Foundation, which wrote the web server software this site administrator is using, has nothing to do with maintaining this site and cannot help resolve configuration issues.</TransEntry>
	<TransEntry LANG="FR">La Fondation Apache (Apache Software Foundation), qui produit le logiciel Apache utilis� par ce site, n'a rien � voir avec la maintenance de ce site et ne peut intervenir sur sa configuration.</TransEntry>
	<TransEntry LANG="IT">Nonostante questo sito stia utilizzando il software Apache, questo non vi garantisce nessun tipo di contatto diretto al Gruppo Apache, quindi vi preghiamo di non inviare email riguardanti questo sito o il materiale in esso contenuto agli autori di Apache.</TransEntry>
  </TransItem>
  
  <TransItem ID="docincluded.id"> 
	<TransEntry LANG="DE"><![CDATA[Die englische <a HREF="manual/">Online-Dokumentation</A> f�r die Apache Web-Server Software ist Bestandteil dieser Software-Distribution.]]></TransEntry>
	<TransEntry LANG="EN"><![CDATA[The Apache <a HREF="manual/">documentation</A> has been included with this distribution.]]></TransEntry>
	<TransEntry LANG="FR"><![CDATA[La <A HREF="manual/">documentation</A> Apache est incluse dans cette distribution.]]></TransEntry>
	<TransEntry LANG="IT"><![CDATA[La <A HREF="manual/">documentazione</A> relativa di Apache � inclusa nella distribuzione.]]></TransEntry>
  </TransItem>

  <TransItem ID="uselogo.id">
	<TransEntry LANG="DE">Dem WebMaster dieser Web-Site steht es frei, das untenstehende Powered by Apache Logo auf einem Apache-basierten Web-Server zu verwenden. Vielen Dank, dass Sie Apache gew�hlt haben!</TransEntry>
	<TransEntry LANG="EN">You are free to use the image below on an Apache-powered web server. Thanks for using Apache!</TransEntry>
	<TransEntry LANG="FR">Le webmaster de ce site peut librement utiliser l'image ci-dessous sur un site web utilisant le logiciel Apache. Merci d'avoir choisi Apache!</TransEntry>
	<TransEntry LANG="IT">Il Webmaster di questo sito � libero di utilizzare l'immagine qui sotto su qualsiasi Web server potenziato con Apache. Grazie per aver scelto Apache!</TransEntry>
  </TransItem>
  			 
</TranslatorDict>
<!-- vi:set sts=2 sw=2 autoindent: -->
--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to