Hello Jonathan,
thanks for your precisions, we have a better understanding of your need.
The problem is that a variant has been designed to contain the
metadata of one representation. If a variant has a list of Languages,
it means that the representation contains the listed languages not
that the
Ah that's great Thierry, thanks for responding so timely and informative.
Excellent news that you will be looking into it, good i18n support seems
to be towards the top of the list for web frameworks.
I'll keep an eye on the RFE.
cheers,
jon
Thierry Boileau wrote:
Hello Jonathan,
thanks
Hello Jon,
here is the code of a sample resource declaring 2 variants with the
same media-type and distinct languages.
I've tested it against release 1.1m2.
best regards,
Thierry Boileau
*
import org.restlet.Context;
import org.restlet.data.Language;
import org.restlet.data.MediaType;
Hi Thierry,
Say I had the client send multiple languages:
Accept-Language: en-gb,fr;q=0.7,en;q=0.3
If using a variant with multiple languages, the code given wouldn't
satisfy the clients preference, since it is using .contains(...). It
would return the language depending on the control
Hi Jonathan,
I'm not sure to clearly understand what you say.
The framework actually includes a content negotiation algorithm which
is in charge to compare the clients preferences (media-type and
languages only) on one side with the list of supported variants
declared by the resource on the other
Thanks for the reply Thierry.
Ah I see, you can only have one language per variant.
I was in a different mindset adding multiple languages per variant.
So, with one language per variant am I correct in thinking that if I
wished to support 6 languages and 3 mediatypes (json,xml,html) that I
Hi,
I've been looking at getting the preferred locale and I have a couple of
questions.
I see that getPreferredVariant() uses apaches content negotiation
algorithm
(http://httpd.apache.org/docs/2.2/en/content-negotiation.html#algorithm)
which includes using the Accept-Language header:
7 matches
Mail list logo