I'm currently trying to find good way to make calls to WCF services in a way that will allow Thread on server to be aware of client culture. After spending couple days reading topics on the web it seems to me that the best way to do this is just to add (string clientCulture) to list of parameters of WCF methods; no longer:
string HelloWorld();
but:
string HelloWorld(string clientCulture);
I hope I am wrong... and I welcome any suggestion that would show me how to do this better. Ideally I would be able to do following:
WcfService srv = new WcfService(); srv.Endpoint.Address = new System.ServiceModel.EndpointAddress( ConfigConstants.ROOT + "Services/WcfService.svc"); // influence address as you are influencing address srv.Culture = new System.Globalization.CultureInfo("fr-FR"); // and every call to server from now on would pass that // culture parameter either in header or body of SOAP message to server
Thanks in advance for any help on this topic!