cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Albert Cervera Areny" <informa...@sedifa.com>
Subject RE: How to translate?
Date Wed, 14 Aug 2002 17:45:29 GMT
Hi,
  the thread is quite old... but anyway, I've tried to make the stylesheet
(please tell me if it is right, by the way how could I avoid that
xmlns:i18n in each generated tag?).
I don't understand some things. I create a messages.xml file which looks
like (I'd prefer not to use simple keys but the original text, I don't
think I can find a name for each element in the site):

<catalogue i18n:lang="ca">
  <message key="maybe a very very long text">maybe a very very long
text</message>
</catalogue>

That's right. This is the file in the same language as the site. Then I
make a couple of copies of it and name it messages_ca.xml (the original
language) and messages_es.xml (because I want to translate it into
spanish). I translate this file:

<catalogue i18n:lang="es">
  <message key="maybe a very very long text">translation of the
text</message>
</catalogue>

And now what? You said I don't need anything else but in the sitemap I
need to tell only one dictionary... Do I need to merge both files into one
dictionary? How do I tell through the sitemap which language to use?
I suppose you only create one messages file for the hole site merging
multiple messages files... and you "refresh" it with another stylesheet..
am I right?

Well... can't think of more questions right now ;)

Thanks in advance!

>> From: Albert Cervera Areny [mailto:informatic@sedifa.com]
>>
>> Hi,
>> I've been looking at the i18n transformer in the
>> documentation web page,
>> however I can't see how it works in production. I got the idea that it
>> works let's say like gettext as you mark which parts you want
>> to translate
>> and generate a file with those messages.... if so... how can I do that
>> easily? I've been looking throw those convert and merge xsl
>> files but they
>> don't seem to generate it. I was able to create a file to
>> translate into
>> one new language from the simple_dict.xml example but how may
>> I create it
>> from scratch?
>
> Seems that your are looking for my text2messages.xsl that I have on my
> harddrive at home ;). But I don't think that you'll have problems in
> creating such a stylesheet yourself if you are familiar with XSLT. You
> just have to generate <message key="">text</message> elements from the
> all 'i18n:text' and all the attributes that are listed in 'i18n:attr'
> attribute. If you don't hurry then I'll send my stylesheet to you
> tomorrow.
>
>>
>> These two files, messages and dictionary, are the ones that
>> make me not to
>> understand the hole process.
>
> The process is this:
> 	- you create a content file and mark some parts of it by 'i18n:text'
> and 'i18n:attr'
> 	- run a stylesheet that generates you an empty dictionary file
> 	- you add your translations to that dictionary (say message_de.xml)  -
> place it in the message catalog (say in the 'translations'
> directory)
> 	- enjoy
>
>>
>> Could someone clarify those aspects or point me to a better resource?
>
> I think that I'm the best resource to ask about i18n. Tell me if you
> have any problems with it.
>
> Konstantin
>
>>
>> Thanks in advance!
>> --
>> Albert Cervera Areny
>> Dept. Informàtica Sedifa, S.L.
>>
>>
>>
>> ---------------------------------------------------------------------
>> Please check that your question  has not already been answered in the
>> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>>
>> To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
>> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
>>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


-- 
Albert Cervera Areny
Dept. Informàtica Sedifa, S.L.



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message