multilingual app

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

multilingual app

dbaechler
Hi everybody

I'm working on a multilingual web app. What would be the best method to do the translations (XForms)?

My plan: Using xsl:lang with multiple XML translation documents (each stored in a different, language-specific, directory).

Thanks in advance
David



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: multilingual app

Erik Bruchez
Administrator
David,

I assume you mean that you would like to localize things such as
messages, hints, labels, etc. in an XForms page?

If I understand, your XForms page would feature xml:lang
attributes. Then, you would have some resource identifiers
(e.g. $my-document-title) in that document. A transformation, such as
an XSLT transformation, would then replace the resource identifiers in
the source document. Is that what you have in mind? That would
certainly work.

This is a good question because we have to work on establishing best
practices for localization of XForms pages.

-Erik

[hidden email] wrote:
 > Hi everybody
 >
 > I'm working on a multilingual web app. What would be the best method
 > to do the translations (XForms)?
 >
 > My plan: Using xsl:lang with multiple XML translation documents
 > (each stored in a different, language-specific, directory).
 >
 > Thanks in advance
 > David




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: multilingual app

Erik Bruchez
Administrator
Thinking further:

1. Another solution is to store all internationalized resources into a
separate XForms instance. labels, hints, etc., with the "ref" attribute,
can refer to strings into that instance. Then you provide a different
instance depending on the language.

How that different instance is provided is an interesting question. If
it is an external instance retrieved by HTTP, content-negociation could
be used to retrieve an instance based on the xml:lang attribute in scope
where the instance is retrieved (<xforms:instance src="..."/>). XInclude
could function in a similar way. Right now, none of these two options
will do content negociation, BTW.

2. alerts, hints, etc. also have "src" attributes. The XForm spec
suggests that content-negociation could be used in conjunction with this
feature to retrieve the correct resource bundle (XML file). The use of
the "src" attribute is being "un-specified" on controls in XForms 1.1,
however.

I believe option #1 above is fairly good. If people tend to agree, we
should work to make it work in OPS.

-Erik

Erik Bruchez wrote:

> David,
>
> I assume you mean that you would like to localize things such as
> messages, hints, labels, etc. in an XForms page?
>
> If I understand, your XForms page would feature xml:lang
> attributes. Then, you would have some resource identifiers
> (e.g. $my-document-title) in that document. A transformation, such as
> an XSLT transformation, would then replace the resource identifiers in
> the source document. Is that what you have in mind? That would
> certainly work.
>
> This is a good question because we have to work on establishing best
> practices for localization of XForms pages.
>
> -Erik
>
> [hidden email] wrote:
>  > Hi everybody
>  >
>  > I'm working on a multilingual web app. What would be the best method
>  > to do the translations (XForms)?
>  >
>  > My plan: Using xsl:lang with multiple XML translation documents
>  > (each stored in a different, language-specific, directory).
>  >
>  > Thanks in advance
>  > David
>



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: multilingual app

dbaechler
Erik,

You reveal some interesting points.

On 20.10.2005, at 17:46, Erik Bruchez wrote:

> Thinking further:
>
> 1. Another solution is to store all internationalized resources  
> into a separate XForms instance. labels, hints, etc., with the  
> "ref" attribute, can refer to strings into that instance. Then you  
> provide a different instance depending on the language.
>
> How that different instance is provided is an interesting question.  
> If it is an external instance retrieved by HTTP, content-
> negociation could be used to retrieve an instance based on the  
> xml:lang attribute in scope where the instance is retrieved  
> (<xforms:instance src="..."/>). XInclude could function in a  
> similar way. Right now, none of these two options will do content  
> negociation, BTW.
I think that he instances should be external, in order to have an  
application that is easy to extend (or to translate).

>
> 2. alerts, hints, etc. also have "src" attributes. The XForm spec  
> suggests that content-negociation could be used in conjunction with  
> this feature to retrieve the correct resource bundle (XML file).  
> The use of the "src" attribute is being "un-specified" on controls  
> in XForms 1.1, however.
But I don't see any other possibility for content-negociation at the  
moment.

>
> I believe option #1 above is fairly good. If people tend to agree,  
> we should work to make it work in OPS.
I would also prefer #1. It is more "future-proof".  But content  
negociation would be a desirable option.
I'm sure that others are also dealing with multiple languages and  
would like to see it work in OPS.

---
David

>
> -Erik
>
> Erik Bruchez wrote:
>
>> David,
>> I assume you mean that you would like to localize things such as
>> messages, hints, labels, etc. in an XForms page?
>> If I understand, your XForms page would feature xml:lang
>> attributes. Then, you would have some resource identifiers
>> (e.g. $my-document-title) in that document. A transformation, such as
>> an XSLT transformation, would then replace the resource  
>> identifiers in
>> the source document. Is that what you have in mind? That would
>> certainly work.
>> This is a good question because we have to work on establishing best
>> practices for localization of XForms pages.
This is exactly what I have in mind. Anyway I have to do a lot of  
XSLT transformations.


>> -Erik
>> [hidden email] wrote:
>>  > Hi everybody
>>  >
>>  > I'm working on a multilingual web app. What would be the best  
>> method
>>  > to do the translations (XForms)?
>>  >
>>  > My plan: Using xsl:lang with multiple XML translation documents
>>  > (each stored in a different, language-specific, directory).
>>  >
>>  > Thanks in advance
>>  > David
>>
>
>
>
> --
> You receive this message as a subscriber of the ops-
> [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/ 
> wws
>



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: multilingual app

Erik Bruchez
Administrator
David B?chler wrote:

>> 2. alerts, hints, etc. also have "src" attributes. The XForm spec  
>> suggests that content-negociation could be used in conjunction with  
>> this feature to retrieve the correct resource bundle (XML file).  The
>> use of the "src" attribute is being "un-specified" on controls  in
>> XForms 1.1, however.
>
> But I don't see any other possibility for content-negociation at the  
> moment.

"src" is not being deprecated on xforms:instance. So this mechanism
should be good for the future. Anywhere you have an "src" attribute, you
could use content negociation to provide a resource in the adequate
language. Now it would be good in OPS if we could use some kind of
"internal" content negociation, without going through HTTP.

>> I believe option #1 above is fairly good. If people tend to agree,  we
>> should work to make it work in OPS.
>
> I would also prefer #1. It is more "future-proof".  But content  
> negociation would be a desirable option.
> I'm sure that others are also dealing with multiple languages and  would
> like to see it work in OPS.

Today you still have the possibility to include the resources instance
with XSLT, making the decision of the language manually. We should
probably build an example showing this.

-Erik



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: multilingual app

dbaechler

On 20.10.2005, at 20:38, Erik Bruchez wrote:

> David Bächler wrote:
>
>
>>> 2. alerts, hints, etc. also have "src" attributes. The XForm  
>>> spec  suggests that content-negociation could be used in  
>>> conjunction with  this feature to retrieve the correct resource  
>>> bundle (XML file).  The use of the "src" attribute is being "un-
>>> specified" on controls  in XForms 1.1, however.
>>>
>> But I don't see any other possibility for content-negociation at  
>> the  moment.
>>
>
> "src" is not being deprecated on xforms:instance. So this mechanism  
> should be good for the future. Anywhere you have an "src"  
> attribute, you could use content negociation to provide a resource  
> in the adequate language. Now it would be good in OPS if we could  
> use some kind of "internal" content negociation, without going  
> through HTTP.
Oh, in that case I misunderstood you.

So one could extend the XPL pipeline of the "page flow epilogue" with  
a kind of language awareness (although it's used for the common look  
and feel). In the view one would have to do it explicitly for each  
part, right?

>
>
>>> I believe option #1 above is fairly good. If people tend to  
>>> agree,  we should work to make it work in OPS.
>>>
>> I would also prefer #1. It is more "future-proof".  But content  
>> negociation would be a desirable option.
>> I'm sure that others are also dealing with multiple languages and  
>> would like to see it work in OPS.
>>
>
> Today you still have the possibility to include the resources  
> instance with XSLT, making the decision of the language manually.  
> We should probably build an example showing this.
But an internal content negociation in OPS would be a real good thing.



BTW, I'm really impressed by the OPS possibilities (even if there are  
a lot of different XML dialects to learn).
Keep up the good work!

---
David






--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: multilingual app

Erik Bruchez
Administrator
David B?chler wrote:

> So one could extend the XPL pipeline of the "page flow epilogue" with  a
> kind of language awareness (although it's used for the common look  and
> feel). In the view one would have to do it explicitly for each  part,
> right?

You could globally, in the epilogue, transform the view to include the
actual resource file depending on language settings, yes. This is a
solution that would work today, as opposed to the "ideal" solution which
we have yet to implement!

BTW I added an RFE for an example showing i18n possibilities:

http://forge.objectweb.org/tracker/index.php?func=detail&aid=304187&group_id=168&atid=350210

> But an internal content negociation in OPS would be a real good thing.

Yes.

> BTW, I'm really impressed by the OPS possibilities (even if there are  a
> lot of different XML dialects to learn).
> Keep up the good work!

Thanks :-) Now back to working on OPS 3.0.

-Erik



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws