Localization - How to get the client locale in socket connection?
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Mojgan_Payvar
Posted On:   Tuesday, July 18, 2006 02:41 PM



Is it possible to get the locale setting of client's machine through a socket connection in order to respond back with the proper language?

Re: Localization - How to get the client locale in socket connection?

Posted By:   Anonymous  
Posted On:   Thursday, July 20, 2006 07:37 AM

Socket connections are just 'connections' in a very literal meaning of the word.

I do not think there is a default way to obtain ANY information about a client, other than that which the client voluntarily shares with the server.


Therefore, I think you'll have to make up some sort of 'protocol' to let the client tell you their locale in a particular format if that is what you want.


Since sockets are not very useful without a clearly established protocol to which both sides comply and protocols are rarely I18N-ized, I cannot think of any use-case for your question.


You could start by looking at HTTP (protocol!) and how that allows the client to specify particular information about itself in (optional) headers.

Re: Localization - How to get the client locale in socket connection?

Posted By:   WarnerJan_Veldhuis  
Posted On:   Wednesday, July 19, 2006 01:30 AM

Only if you design your protocol to begin with an handshake. There you can exchange information about eachother.
About | Sitemap | Contact