none
How to set localization (language) before the service is called RRS feed

  • Question

  • Hi,

    Is anybody hier has experience to set localization before the WCF service is called?

    For example, user A want to use our service. If their desktop or browser set in english, so any message/report from our service will be return in english. If their desktop or browser is set to german, then any message/report from our service will be return in german.

    The localization has been setup in our code. The problem now, we want to set the localization to any preffered user before the service made call. Preffered using the localization from the user language setting in desktop. However using the user language setting in browser will also OK.

    Is anyone can help me which approach can I use to accomplish my requirement?

    Regards

    Monday, July 7, 2014 7:31 AM

Answers

All replies

  • Hi,

    From your description, I know that you want to set the localization in the WCF Service, then the following article has demonstrated about how we could implement such a solution by implementing a custom WCF MessageInspector, for more information, please try to check it:
    #Automatic Culture Flowing with WCF by using Custom Behaviour:
    http://www.codeproject.com/Articles/21504/Automatic-Culture-Flowing-with-WCF-by-using-Custom .

    Besides, the following article may also help you:
    #Making your WCF to speak in multiple languages:
    http://weblogs.asp.net/cibrax/making-your-wcf-web-apis-to-talk-in-multiple-languages .


    Best Regards,
    Amy Peng

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by wapt49 Tuesday, July 8, 2014 2:31 PM
    Tuesday, July 8, 2014 8:07 AM
    Moderator
  • Hi,

    When I implementing a custom WCF MessageInspector would it violating the interoperability to the client? I mean would it be possible if my client using java?

    Regards

    Widia

    Thursday, July 10, 2014 8:51 AM