You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Takashi Okamoto <to...@kun.ne.jp> on 2001/10/29 13:57:05 UTC

[PROPOSAL & PATCH] about multilingual web page

Hello, velocity.

I have a proposal which is the convenience funtion to provide
multilingual web pages for anakia. This proposal is discussed by 
Ja-Jakarta mailing list which is Japanese user, translator and 
developr group for Jakarta. I hope this proposal is useful to merging 
Japanese and other language translation into Jakarta site. 

Currently, one anakia task can generate only one language document.
For exapmle, assume to be provided following docuemnt:

xdocs-en/(English document)
	index.xml
	guide.xml
	.
	.

xdocs-ja/(Japanese document)
	index.xml
	guide.xml
	.
	.

When you use Apache's content negotiation, you may write following tasks:

      <anakia basedir="xdocs-en" destdir="docs/"
           extension=".html.en" style="./site.vsl"
           projectFile="stylesheets/project.xml"
           excludes="**/stylesheets/** empty.xml"
           includes="**/*.xml"
           lastModifiedCheck="true"
           templatePath=".">
      </anakia>

      <anakia basedir="xdocs-ja" destdir="docs/"
           extension=".html.ja" style="./site.vsl"
           projectFile="stylesheets/project.xml"
           excludes="**/stylesheets/** empty.xml"
           includes="**/*.xml"
           lastModifiedCheck="true"
           templatePath=".">
      </anakia>


Currently, only two documents are provided (English and Japanese).
You'll write only two task, but there may be a lot of language in the futuer
(In the fact, Debian have over twenty translation!!). 
This way isn't so good idea because you must write task for each language.
And you must specify encoding for each language.

Well, we propose following three function (attribute):
	
[multilingual]
This attribute is boolean to specify multilingual documents are provided. 
For example:

      <anakia basedir="xdocs" destdir="docs/" multilingual="true"

Above case, ankaia task scan subdirectory of xdocs-<lang>; lang is 
en,ja,fr..etc. This task generates following files into each language 
directory:

      docs-en/
	index.html
	guide.html

      docs-ja/
	index.html
	guide.html


[forWeb]
This attribute specify the purpose which is web or local document.
By default, forWeb attribute is false and document is gererated for local.
But when it's true, document is gererated for Apache web server's econtent 
negotiation. 

For example: 

      <anakia basedir="xdocs" destdir="docs/" multilingual="true"
	      forWeb="true" 

      docs/
	index.html.en
	index.html.ja
	guide.html.en
	guide.html.ja

So, document is generated in one directory with langauage prefix. This 
function is useful to use Apache's contents negotiation.


[outdated] 
When this attribute true, provide the message for outdated when translated 
document is older than original document. Debian site (http://www.debian.org/)
have this function. It's convinience to know current translation is ok
or outdated.

I have two opinion about this function. One is put version information
into each xml file. 

	<document>

	 <properties>
	  <version>1.1</version>
	    ...
	 </properties>

When compile document, check version and if version is older than
other document, write outdated message at bottom of document like

  'This document is outdated. Please see the original document for 
  recent information.'

I attached briefly patch for above function 'multilingual' and 'forWeb'.
This patch haven't provide 'outdated' function yet. Maybe it needs
much works...

best regards.
----
Takashi Okamoto



Re: [PROPOSAL & PATCH] about multilingual web page

Posted by Takashi Okamoto <to...@kun.ne.jp>.
At Mon, 29 Oct 2001 13:35:45 -0500,
Geir Magnusson Jr. <ge...@optonline.net> wrote:
> I like the idea.  However, I would prefer
> 
> Xdocs/
>     en/
>        index.xml
>        guide.xml
>     ja/
>        index.xml
>        guide.xml
> 
> Just to keep the top level directory smaller, and group this related
> information, the documentation xml, into one tree.  Would that pose a
> problem?

It's no problem. You can use <anakia basedir="Xdocs/"... for it.

But when you'll merge Japanese document into velocity, you should not
send CVS log about 'Xdocs/ja' to velocity-devel because most of people
can't understand mysterious Japanese characters. If you'll merge our
documents, I would like you to send CVS logs about Japanese to
our(Japanese) mailing list or make new mailing list at Jakarta for
Japanese.
----
Takashi Okamoto





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [PROPOSAL & PATCH] about multilingual web page

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
I like the idea.  However, I would prefer

Xdocs/
    en/
       index.xml
       guide.xml
    ja/
       index.xml
       guide.xml

Just to keep the top level directory smaller, and group this related
information, the documentation xml, into one tree.  Would that pose a
problem?

geir


On 10/29/01 7:57 AM, "Takashi Okamoto" <to...@kun.ne.jp> wrote:

> Hello, velocity.
> 
> I have a proposal which is the convenience funtion to provide
> multilingual web pages for anakia. This proposal is discussed by
> Ja-Jakarta mailing list which is Japanese user, translator and
> developr group for Jakarta. I hope this proposal is useful to merging
> Japanese and other language translation into Jakarta site.
> 
> Currently, one anakia task can generate only one language document.
> For exapmle, assume to be provided following docuemnt:
> 
> xdocs-en/(English document)
> index.xml
> guide.xml
> .
> .
> 
> xdocs-ja/(Japanese document)
> index.xml
> guide.xml
> .
> .
> 
> When you use Apache's content negotiation, you may write following tasks:
> 
>     <anakia basedir="xdocs-en" destdir="docs/"
>          extension=".html.en" style="./site.vsl"
>          projectFile="stylesheets/project.xml"
>          excludes="**/stylesheets/** empty.xml"
>          includes="**/*.xml"
>          lastModifiedCheck="true"
>          templatePath=".">
>     </anakia>
> 
>     <anakia basedir="xdocs-ja" destdir="docs/"
>          extension=".html.ja" style="./site.vsl"
>          projectFile="stylesheets/project.xml"
>          excludes="**/stylesheets/** empty.xml"
>          includes="**/*.xml"
>          lastModifiedCheck="true"
>          templatePath=".">
>     </anakia>
> 
> 
> Currently, only two documents are provided (English and Japanese).
> You'll write only two task, but there may be a lot of language in the futuer
> (In the fact, Debian have over twenty translation!!).
> This way isn't so good idea because you must write task for each language.
> And you must specify encoding for each language.
> 
> Well, we propose following three function (attribute):
> 
> [multilingual]
> This attribute is boolean to specify multilingual documents are provided.
> For example:
> 
>     <anakia basedir="xdocs" destdir="docs/" multilingual="true"
> 
> Above case, ankaia task scan subdirectory of xdocs-<lang>; lang is
> en,ja,fr..etc. This task generates following files into each language
> directory:
> 
>     docs-en/
> index.html
> guide.html
> 
>     docs-ja/
> index.html
> guide.html
> 
> 
> [forWeb]
> This attribute specify the purpose which is web or local document.
> By default, forWeb attribute is false and document is gererated for local.
> But when it's true, document is gererated for Apache web server's econtent
> negotiation. 
> 
> For example: 
> 
>     <anakia basedir="xdocs" destdir="docs/" multilingual="true"
>      forWeb="true"
> 
>     docs/
> index.html.en
> index.html.ja
> guide.html.en
> guide.html.ja
> 
> So, document is generated in one directory with langauage prefix. This
> function is useful to use Apache's contents negotiation.
> 
> 
> [outdated] 
> When this attribute true, provide the message for outdated when translated
> document is older than original document. Debian site (http://www.debian.org/)
> have this function. It's convinience to know current translation is ok
> or outdated.
> 
> I have two opinion about this function. One is put version information
> into each xml file.
> 
> <document>
> 
> <properties>
>  <version>1.1</version>
>    ...
> </properties>
> 
> When compile document, check version and if version is older than
> other document, write outdated message at bottom of document like
> 
> 'This document is outdated. Please see the original document for
> recent information.'
> 
> I attached briefly patch for above function 'multilingual' and 'forWeb'.
> This patch haven't provide 'outdated' function yet. Maybe it needs
> much works...
> 
> best regards.
> ----
> Takashi Okamoto
> 
> 
> 
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 

-- 
Geir Magnusson Jr.     geirm@optonline.net
System and Software Consulting
"Whoever would overthrow the liberty of a nation must begin by subduing the
freeness of speech." - Benjamin Franklin



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>