Bug: using a neutral language < "en-us" is ignored

Last post 04-24-2009, 9:09 AM by Anonymous. 2 replies.
Sort Posts: Previous Next
  •  04-20-2009, 1:46 PM 51275

    Bug: using a neutral language < "en-us" is ignored

    If a custom culture such as "de" is entered, even if a "de.xml" file is present in the Languages folder, it will be ignored.  This only happens if the custom culture comes alphabetically before "en-us".
     
    --Troy
  •  04-24-2009, 5:26 AM 51494 in reply to 51275

    Re: Bug: using a neutral language < "en-us" is ignored

    Hi wolbrink,
     
    I can not reproduce this issue, i test de-DE and da, it works fine for me.
     
    if you want to set custom culture to 'de', please use 'de-DE'.
     
    Regards,
     
    Ken
  •  04-24-2009, 9:09 AM 51502 in reply to 51494

    Re: Bug: using a neutral language < "en-us" is ignored


    > if you want to set custom culture to 'de', please use 'de-DE'.
     
    Yes, I already discovered this workaround.  My Community Server installation has only neutral languages defined.  So it was an inconvenience to me taking me a few hours to figure out what was going on.  Finally I ended up with this code:
     
    protected void Application_AuthenticateRequest(Object sender, EventArgs e)
    {
     
    User user = CSContext.Current.User;
     
    if (user.Profile.Language == "de")
       
    // fixes a bug where neutral cultures < en-us are ignored
       
    System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("de-DE");
      else
        System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(user.Profile.Language);
      // set config so that CurrentUICulture is used
      CuteChat.ChatApi.SetConfig("CultureType", "Server");
      CuteChat.
    ChatApi.SetConfig("CurrentCulture", "");
    }

    So, although I realize there's a workaround, I'd still like to see the bug fixed.  Most bugs have workarounds, it's just usually a major pain having to figure out what that workaround is.
     
    Thanks,
    Troy
View as RSS news feed in XML