Add Yii2 date conversion to admin panel #170
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This merge request add ability of automatic date converting, based on
Yii::t
function andphp-intl
extension to module. If this extension is installed in server and user had been selected a language expecten
onconfig.php
file, localized date will be shown. Also Farsi translation will add to project with this merge request.PS. I think
'{0, date, MMMM dd, YYYY HH:mm:ss}' => '{0, date, dd MMMM YYYY، HH:mm:ss}',
(Based on correct regional format) must be added to all translation files for correct showing of date.Example
Without this lines
on
![screen shot 2016-10-20 at 15 15 51](https://cloud.githubusercontent.com/assets/1416085/19558652/822b7e72-96d8-11e6-8d03-9860e017ac6e.png)
![screen shot 2016-10-20 at 15 15 24](https://cloud.githubusercontent.com/assets/1416085/19558662/92c618e6-96d8-11e6-8f9d-632e57ccf0c2.png)
web/config.php
date is like this:and with them is like this:
which is a correct Jalali date.