Skip to content

Conversation

siiick
Copy link
Contributor

@siiick siiick commented Aug 20, 2025

Fix rehydration errors on date formats by using the applied language from the translation hook instead of the navigator.

@siiick siiick requested a review from ChibiBlasphem August 20, 2025 21:39
Copy link
Contributor

@ChibiBlasphem ChibiBlasphem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not against it, but the whole purpose of useFormatLanguage was for it to be different from the translation language.

ie: You could have the app translated in english but have dates and numbers formated in FR format.

I personally thinks that this PR is simplifying the matter but I think it's better to ask @Pascal-Delange if it's really what we want.

@siiick
Copy link
Contributor Author

siiick commented Aug 25, 2025

@Pascal-Delange what are you thoughts on this ?

Copy link
Contributor

@Pascal-Delange Pascal-Delange left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I'm unsure.
I do think that having the possibility of having different formats (for numbers, dates...) between american english, british english, etc... is not stupid and overkill, and I'm not sure that hard coding to "we only handle "fr-FR" and "en-GB" is the best fix to our issues.
I'm biased to think that better using what information the browser already gives us, is a better direction. But let's discuss this one orally this week.

case 'fr':
return 'fr-FR';
case 'ar':
return 'ar';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't there be a region here ?

@siiick
Copy link
Contributor Author

siiick commented Aug 27, 2025

closing since we go with the initial PR #1000

@siiick siiick closed this Aug 27, 2025
@Pascal-Delange Pascal-Delange deleted the feat/better-locale-handling branch September 3, 2025 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants