Book price locale fix for GCN 1.1

Last post 10-02-2005 2:01 PM by wschlichtman. 2 replies.

Sort Posts:

  • Book price locale fix for GCN 1.1

    09-30-2005, 10:35 PM
    • Member
      30 point Member
    • wschlichtman
    • Member since 09-30-2005, 10:22 PM
    • Posts 6
    I think I've fixed the book price bug listed in the documentation.

    In the file App_Code\Engine\Modules\Books\Controls\BookPrice.cs, add the following private variable to the BookPrice class:

    private string _priceFormatString = "{0:C}";

    In the RenderContents() method, replace the line:

    writer.Write(_price.ToString("c", new CultureInfo(_cultureName)));

    with:

    writer.Write(String.Format(_priceFormatString, _price));

    The CultureName property is never changed from it's initial state which prevents the CultureInfo() class from getting properly instantiated. The change I've proposed seems to work fine and the price is now localized. Please let me know if you find otherwise.

  • Re: Book price locale fix for GCN 1.1

    10-01-2005, 5:05 AM
    • Participant
      1,925 point Participant
    • para7
    • Member since 06-05-2003, 5:55 AM
    • Denmark
    • Posts 385
    Thanks for the fix. But I haven't noticed any errors. Can't see any difference after the fix.

    Jørgen
    Jørgen A.J.

  • Re: Book price locale fix for GCN 1.1

    10-02-2005, 2:01 PM
    • Member
      30 point Member
    • wschlichtman
    • Member since 09-30-2005, 10:22 PM
    • Posts 6
    I think it only showed up if you changed locale in Windows, such as from Finnish to English-US. It was listed in the "Known Bugs" area of the docs. It was apparent on my system.
Page 1 of 1 (3 items)