Page 1 of 1

About Question enthuware.jwpv6.2.592 :

Posted: Thu Jan 01, 2015 2:43 pm
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 ?

Re: About Question enthuware.jwpv6.2.592 :

Posted: Thu Jan 01, 2015 9:43 pm
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.

Re: About Question enthuware.jwpv6.2.592 :

Posted: Sat Jan 03, 2015 1:55 pm
by navaare
Fair enough, thx Paul

Re: About Question enthuware.jwpv6.2.592 :

Posted: Mon Jun 13, 2016 10:49 pm
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.

Re: About Question enthuware.jwpv6.2.592 :

Posted: Mon Jun 13, 2016 10:56 pm
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.