Bruce Chapman wrote
I will have to take a look at this. I may be using a .net inbuilt number format routine, which is why you'd be getting the , instead of a . - the solution will be to either change to use a different routine, or force the format to ignore localisation.
Any chance of getting a Culture invariant version of the GoogleSitemapProvider module?
I have tryed to do it myself but my programing skills are very basic.
I have found in GoogleSitemapProvider.cs around line 730 the routine that pulls out the PagePriority from the DB
public double GetTabPriority(double defaultPriority, TabInfo ti)
{
//use reflection to get the Sitemap Priority from the TabInfo object, and if it's not there, return the default priority
System.Reflection.PropertyInfo pi = typeof(TabInfo).GetProperty("SiteMapPriority");
if (pi == null)
return defaultPriority;
else
{
float priority = (float)pi.GetValue(ti, null);
double result = Convert.ToDouble(priority);
return System.Math.Round(result, 2);
//return result;
}
}
I have tryed to change:
double result = Convert.ToDouble(priority);
to:
double result = Convert.ToDouble(priority, System.Globalization.NumberFormatInfo.InvariantInfo);
The only result I got was that the numbers got converted to whole numbers (0,5 = 5).
Please help me out with this.