Yii Framework Forum: Formatter shortcut to go through Yii::t() in grid view - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Formatter shortcut to go through Yii::t() in grid view Rate Topic: -----

#1 User is offline   Pierre M 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 26
  • Joined: 28-August 14
  • Location:Belgium

Posted 15 May 2015 - 10:36 AM

Hello,

In gridview, when I want to display a localized string, I have to go through

    'value' => function($model, $key, $index, $widget) {
        return Yii::t('domain', $model->status);
    },


Wouldn't it be useful to get a shortcut like this:

    ...
    'status:t:domain',
    ...


The formatter would return Yii::t('domain', $model->status), like it does it for date, currency, or other format.

Thank you.

P.
Don't force it. Use a bigger hammer. -- Unix fortune(1)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users