Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

ssddanbrown
Copy link
Member

@ssddanbrown ssddanbrown commented Sep 17, 2023

For #4501

Todo

From carbon docs:

You also may know formatLocalized() method from Carbon 1. This method still works the same in Carbon 2 but you should better use isoFormat() instead.

->isoFormat(string $format): string use ISO format rather than PHP-specific format and use inner translations rather than language packages you need to install on every machine where you deploy your application

So think we'd just need to align with Carbon's expected locale format. Needs testing in all locations where datetime locales are used. Probably don't need to set PHP level locale now.

- Reduced app settings down to what's required.
- Used new view-shared $locale object instead of using globals via
  config.
- Aligned language used to default on "locale" instead of mixing
  locale/language.

For #4501
There was a lot of locale handling to get correct/expected date
formatting within the app.
Carbon now has built-in locale content rather than us needing to target
specific system locales.

This also removes setting locale via Carbon directly.
Carbon registers its own Laravel service provider which seems to
accurately pull the correct locale from the app.

For #4555
@ssddanbrown ssddanbrown merged commit 35813e8 into development Sep 17, 2023
@ssddanbrown ssddanbrown deleted the language_cleanup branch September 17, 2023 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

1 participant