-
-
Notifications
You must be signed in to change notification settings - Fork 352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lava Behaves Differently In Different Cultures #4100
Comments
Isn't Lava run on the server where it should just have the single culture defined? How would something that runs on the server be affected by a browser's culture setting? (not saying you are wrong, just not understanding how that could be happening) |
You would think that would be the case. Here is a concise overview of what is happening: https://stackoverflow.com/a/8681657 Basically .NET Framework knows the client's culture and unless do your parsing and formatting with the Culture.Invariant flag its all done culturally. It's doubly difficult because sometimes you might want to parse according to the client's culture and other times you need to not. |
oh wow. That would explain some random culture issues in chat that we could never figure out. |
This is interesting because the meaning of the input data is drastically different from US to DE (for example) depending on whether you write "1.5" or "1,5". In other words, if I correctly write the input as "1,5" (for de-DE) and then run the lava (using a browser culture settings of de-DE), the output is correct (Lava produces the expected result):
Same for these as well... The input data needs to match the culture/context:
So, without changing the input data (the data being passed to Lava) we can't really say to much about Lava's responsibility... unless we're proposing that all Lava [text] input and output must be done in en-US formatting). |
Hello @nairdo - Any update here? We have a large Spanish congregation and it is causing major issues for them. We are charging $8.00 for an event, and it's changing to $8,00 (error). |
We're having this issue for our Spanish speaking people. Any advancements with the issue at this point or suggestions? |
We have not forgotten about this, but we have not been working on this recently as we've been working on other issues. As I eluded to above, there are a variety of situations involving Lava in many different cases. So I think it would be helpful if each of you would identify the exact situation and configuration** that is causing your particular issue. **The more detail you can supply, the better it will be for us to try to identify a solution to each situation. |
Thanks @nairdo - The exact problem we are experiencing is not from using lava (I don't think). If you change your device's system language (I tried this on my mac), and go to our event registration: https://rock.cfbc.org/page/1218?RegistrationInstanceId=560&EventOccurrenceID=532 you'll see that the $8.00 is changed to $8,00 ..This makes it impossible to pay, and results in an error. This is pretty big problem for us because we have a large Spanish-speaking congregation. Any help you can give would be much appreciated. |
Hi Spark team, has there been any movement on this. We are in a season where we are doing several conferences for our Spanish speaking campuses and it is impacting their attenders ability to register for events pretty hard. Any update on the progress of this bug would be greatly appreciated and or a workaround would be greatly apprecatied. So far we have tried wrapping the registration block in a div with a |
@cfunkdev & @Stevenlmiori This one is a very non-trivial problem and there is no clear solution. But since you're describing a problem not with Lava but with something else, can you clarify? For your situation, are you having an internationalization problem with payments and the Registration Entry block? If so, can you tell me if the problem occurs regardless of using the legacy Registration Entry (webforms) block or the Registration Entry 🎉 (Obsidian) block?
|
Description
ASP.NET's internationalization seems to cause lava to behave in unpredictable ways. This is particularly problematic for our missionaries and ministry partners over seas. Because these have to do with dates and numbers, the importance of accuracy is imperative. Additionally, adding caching makes tracking down the actual cause more difficult.
en-GB (and other countries) use the date format 'day/month/year' which means two different people can parse the same string as a date different ways. As long as the date stays as a DateTime things are fine, but string are parsed by lava differently in different countries. This is nice for displaying appropriate text for the reader, but not for getting accurate data.
de-DE (and other countries) switch the use of periods and comas in numbers (1,000.5 vs 1.000,5) This means that the behaviour of non-integer numbers is different in different cultures. Even when the lava developer writes a non-integer (as opposed to a number in a string), the lava parser will interpret the number based on the users culture. This causes interesting and unexpected behaviours.
Steps to Reproduce
Set your browser to render webpages using en-GB (United Kingdom) for dates and de-DE (Germany) for numbers
I have tested this on all the environments I can get my hands on and confirmed the expected and incorrect values..
Versions
The text was updated successfully, but these errors were encountered: