none
Mixed translation from validate message running from hosting server

    問題

  • Hi,

    Validate error message (in this example “duplicates”) doesn’t translate to Spanish when running from arvixe server

    When I run a local test it work ok, but when I publish and run the app from hosting server it return mixed languages.

    In General Properties I choose Spanish culture option.

    Please help

    Thanks.

    Daniel
    • 已編輯 Daniel Ra 2012年3月2日 下午 11:27
    2012年3月2日 下午 11:26

解答

  • Hi,

    I think only the message you highlighted is returned from web server. Others are from client assemblies so they are Spanish (client gets the error message from server and knows there is a validation error so grab string resources from it's assembly to show validation error occurred text, then show the error message returned from server).

    The problem now is it seems the setting you changed in IIS doesn't help to change the culture of server app. I just tried. The culture you use could not be found on my side. I think for Spanish you should use Spanish (es). Based on my test after setting this the server returns exactly the same message mentioned in the first screenshot you posted. Could you try it?


    Allen Chen [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    2012年3月7日 上午 02:23
    版主
  • Hi,

    My mistake.

    On my first attempts I publish in Culture=English then I changed the Culture to Spanish but when updating the web site via FTP with the next builds I always leave the original web.config file.

    That way I don’t have to modify the connection strings in the web.config each time I publish

    So the original web.config file had this line "ApplicationCulture" value="en-us" I changed it to "ApplicationCulture" value="es" and everything is normal again

    Thanks for your help and sorry for any inconvenience

    Daniel

    • 已標示為解答 Otomii Lu 2012年3月7日 上午 08:22
    2012年3月7日 上午 04:11

所有回覆

  • Have you checked the local of the user running the application on the hosted server.
    2012年3月5日 上午 12:23
  • Hi,

    Do you develop a 2-tier or 3-tier LS application? This message is returned from Microsoft.LightSwitch.Server assembly. If you're developing 3-tier LS application this behavior is normal if the culture of the end user machine is different from the server machine.

    To resolve the problem, if you're using IIS7 you can refer to below article to change the globalization setting of the service web site:

    http://technet.microsoft.com/en-us/library/cc771836(v=ws.10).aspx


    Allen Chen [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    2012年3月5日 上午 08:30
    版主
  • Hi,

    Allen: This is a 3-tier LS application.
    I change the settings on the NET Localization page to Spanish, but part of the error messages is still in English.

    One interesting note:
    I published the same app; one as a Desktop and the other as a Web. 
    The Desktop app displays the error messages ok. (All the sentence is in Spanish), but the Web app displays the first section of the messages in Spanish and the last in English.

    Glenn: I checked the local regional setting of my PC and they are in Spanish.

    I’m using Windows 7 Spanish version, IE9 Spanish, Chrome Spanish.

    Thanks

    2012年3月7日 上午 12:52
  • Hi,

    I think only the message you highlighted is returned from web server. Others are from client assemblies so they are Spanish (client gets the error message from server and knows there is a validation error so grab string resources from it's assembly to show validation error occurred text, then show the error message returned from server).

    The problem now is it seems the setting you changed in IIS doesn't help to change the culture of server app. I just tried. The culture you use could not be found on my side. I think for Spanish you should use Spanish (es). Based on my test after setting this the server returns exactly the same message mentioned in the first screenshot you posted. Could you try it?


    Allen Chen [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    2012年3月7日 上午 02:23
    版主
  • Hi,

    My mistake.

    On my first attempts I publish in Culture=English then I changed the Culture to Spanish but when updating the web site via FTP with the next builds I always leave the original web.config file.

    That way I don’t have to modify the connection strings in the web.config each time I publish

    So the original web.config file had this line "ApplicationCulture" value="en-us" I changed it to "ApplicationCulture" value="es" and everything is normal again

    Thanks for your help and sorry for any inconvenience

    Daniel

    • 已標示為解答 Otomii Lu 2012年3月7日 上午 08:22
    2012年3月7日 上午 04:11