About Question enthuware.jwpv6.2.592 :

Moderator: admin

Post Reply
navaare
Posts: 6
Joined: Thu Jan 01, 2015 2:27 pm
Contact:

About Question enthuware.jwpv6.2.592 :

Post by navaare »

By setting a different subdomain for different language. For example, en.abc.com or ru.abc.com
This is not a good idea because there can be hundreds of languages. Further, user may not even know which site to go to in the first place.
IMO this is rather not correct explanation. Maybe the whole answer is wrong.
It may sound like sth Nowadays we may use some part of domain to indicate a language like google.com google.en nikon.pl nikon.nl and convention is to keep tail sub-domain as language oriented

It seems that such approach maybe even efficient in some cases What do you think ?

admin
Site Admin
Posts: 10046
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.jwpv6.2.592 :

Post by admin »

en.google.com is different from google.en (which is what you are referring to). google.en is a different domain (not a subdomain) from google.nl. Second, sub domains are meant for organization of content and not for delivering the same content in different language.

accept-language is meant for this purpose.
Please see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

HTH,
Paul.
If you like our products and services, please help us by posting your review here.

navaare
Posts: 6
Joined: Thu Jan 01, 2015 2:27 pm
Contact:

Re: About Question enthuware.jwpv6.2.592 :

Post by navaare »

Fair enough, thx Paul

himaiMinh
Posts: 358
Joined: Fri Nov 29, 2013 8:26 pm
Contact:

Re: About Question enthuware.jwpv6.2.592 :

Post by himaiMinh »

ServletRequest and HttpServletRequest do not have setHeader method. How can header can be set in the request ?
The setHeader method exists in ServletResponse instead.

admin
Site Admin
Posts: 10046
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.jwpv6.2.592 :

Post by admin »

Nowhere in the question or the explanation does it say that there is a setHeader method or you need to set the header in ServletRequest or HttpServletRequest.

If you go through the explanation, it clearly explains that it is the browser that can set an "accept-language" header in the request. The servlet can use this header value to generate content in that language.

Please read all the explanation that is provided with this question.

HTH,
Paul.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 37 guests