Closed aldesrahim closed 2 years ago
Hi @aldesrahim thanks for the contribution.
What does this actually do?
based on carbon documentation
Format as ->format() do (using date replacements patterns from http://php.net/manual/fr/function.date.php) but translate words whenever possible (months, day names, etc.) using the current locale. Method added: 2.16.0
Hi @jamesmills, the translatedFormat do is like format but translated to current language, its very useful for multi-lang app. Thanks.
My only issue with this is that it will force everything to use the translatedFormat
when sometimes this might not be either expected or wanted.
I feel we need to add an option/flag or additional function for this.
Thoughts all?
Hi @jamesmills, thanks for your response.
I've no problem if you want to add an option/flag or additional function for this, I agree to whatever path you're choosing 👍
Hi @jamesmills, i've added some changes for enabling/toggling translation. if you have time, please take a look at my PR. Thank you !
Change format to translatedFormat for enabling translation.
Tested on Laravel 8