Skip to content

Conversation

crazynds
Copy link

@crazynds crazynds commented Mar 19, 2025

I recently had a problem using laravel-file-maneger. When I opened the manager it didnt show any file, only folder. Trying to find the problem I found the following error in the frontend:
image

So looking more deep I found the problem is the same as here: formatjs/formatjs#2440

Basically, if you use intl for internationalization, it wont work if it couldnt find a valid lang for the case, so, 'pt_BR' is a invalid lang, but 'pt-BR' is valid.

But why dont I change that in the app.php config?

Because php use the oposite 😃.
You can see here: https://www.php.net/manual/en/intlcalendar.getavailablelocales.php

So, this PR only replace all _ in a locale with -. I checked and any Intl locales use '_' in their names.

@crazynds
Copy link
Author

@alexusmai Could you give some attention to this?
I think it should take less than 2 minutes.

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.

1 participant