We have a Web.API application where we have to supported a Dutch and English language. For that we have set the culture as “nl” or “en” based on the user request.
But, we have facing the issue in “NumberDecimalSeparator” because for “en” it’s “.” and for “nl” it’s “,”. Now When user want to post or get any data for “nl” language then value should be display/posted as “,” and for “en” language it should display/posted as “.”.
Does anyone have idea on that How we can handle this ?
I am using Linq query and I have to display retried data based on language.
Thank you in advance..
Linq Query as bellow
var test = await (from x in db.instance.Where(x => x.ID == 36)
select new GeofenceAttributeModel()
{
Address = x.geofenceattribute != null ? x.geofenceattribute.Address : string.Empty,
Latitude = x.geofenceattribute != null && x.geofenceattribute.Latitude.HasValue ? x.geofenceattribute.Latitude : null,
Longitude = x.geofenceattribute != null && x.geofenceattribute.Longitude.HasValue ? x.geofenceattribute.Longitude : null,
RadiusInMtr = x.geofenceattribute != null ? x.geofenceattribute.RadiusInMtr.ToString() : string.Empty
}).FirstOrDefaultAsync();