locked
How to force chrome & firefox to use application regional settings? RRS feed

  • Question

  • Hello!

    Have some issues with regional settings in chrome and firefox.. App regional setting is set to Croatian and in IE 11/12 this works fine, but in chrome and FF no matter what I do regional settings are en-Us (dates and time - even if I change preferred language of Chrome/FF to Croatian, spellchecker, etc..). I've tried this on PC's where windows language is Croatian and also where windows language is English, and app behaves same way.. If I can't solve this I can literraly wipe my butt with LS app.. Any advice? Thanks in advance..

    Kivito


    Nobody expects the Spanish Inquisition! (M.P.F.C.)

    Wednesday, October 14, 2015 8:16 AM

Answers

  • After countless hours of head-desk-ing I stumbled on solution by coincidence..

    I've tried to implement dynamic language change (d-fens blog), tried to manipulate with accept-language http header, checking whats happening with fiddler, I was changing advanced language options of various browsers, even have hardcoded language value into msls script.. and nothing was reliable.. Then (can say from pure despair) I started FF and used developer tools to debug; after some looping trough language section of msls script I've noticed that it was started to work with FF! I got impression that there is some timeout issue when msls script cache globalization scripts from aspnetcdn, so I've added direct path to Croatian culture scripts on aspnetcdn into defalt.htm beneath globalize.min.js script (

    <script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/globalize/0.1.1/cultures/globalize.culture.HR.js"></script>

    ) and it started to work on all devices (all browsers, also on smartphones, etc..).. This was strange and intense.. meh.. hope this one is the final solution..

    Kivito


    Nobody expects the Spanish Inquisition! (M.P.F.C.)

    • Marked as answer by Kivito Sunday, October 18, 2015 1:33 PM
    Sunday, October 18, 2015 1:33 PM

All replies

  • I guess I solved it.. 

    I have added next line in web.config (somewhere between system.web tags):

    <system.web>

          .........

          <globalization uiCulture="auto" culture="hr" />

          .........

    </system.web>

    and it started to work in debug mode of VS2013, but still not on IIS..

    Next I went to app config on IIS and under .NET globalization I have set "Enable client based culture" to true, after that it started to work on IIS also.. still, I needed to set Chrome's preferred language to Croatian..  Perhaps it would also work without that addition to web.config but I'm gonna check that later.. 

    Hmm, still doesn't work on my phone..

    Kivito


    Nobody expects the Spanish Inquisition! (M.P.F.C.)


    • Marked as answer by Kivito Wednesday, October 14, 2015 4:16 PM
    • Edited by Kivito Wednesday, October 14, 2015 5:12 PM it seems
    • Unmarked as answer by Kivito Thursday, October 15, 2015 6:37 AM
    Wednesday, October 14, 2015 4:16 PM
  • Meh it doesn't work in Firefox either, and in Chrome and Vivaldi you need to refresh site few times to get it working.. I'm open for more suggestions.. Littlebit desperate..

    Can't believe no one have hit this already.. MS team?

    Kivito


    Nobody expects the Spanish Inquisition! (M.P.F.C.)

    Thursday, October 15, 2015 6:40 AM
  • Hmm now it seems it's working in debug but not in release (in chrome).. bump?! bump!

    Nobody expects the Spanish Inquisition! (M.P.F.C.)

    Friday, October 16, 2015 8:01 AM
  • After countless hours of head-desk-ing I stumbled on solution by coincidence..

    I've tried to implement dynamic language change (d-fens blog), tried to manipulate with accept-language http header, checking whats happening with fiddler, I was changing advanced language options of various browsers, even have hardcoded language value into msls script.. and nothing was reliable.. Then (can say from pure despair) I started FF and used developer tools to debug; after some looping trough language section of msls script I've noticed that it was started to work with FF! I got impression that there is some timeout issue when msls script cache globalization scripts from aspnetcdn, so I've added direct path to Croatian culture scripts on aspnetcdn into defalt.htm beneath globalize.min.js script (

    <script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/globalize/0.1.1/cultures/globalize.culture.HR.js"></script>

    ) and it started to work on all devices (all browsers, also on smartphones, etc..).. This was strange and intense.. meh.. hope this one is the final solution..

    Kivito


    Nobody expects the Spanish Inquisition! (M.P.F.C.)

    • Marked as answer by Kivito Sunday, October 18, 2015 1:33 PM
    Sunday, October 18, 2015 1:33 PM