Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add translation support for the models #41

Open
aliechti opened this issue Aug 11, 2015 · 0 comments
Open

Add translation support for the models #41

aliechti opened this issue Aug 11, 2015 · 0 comments

Comments

@aliechti
Copy link

The models do not use Yii:t() which would be useful, for using the models in another language.

This would for example in OauthAccessTokens change:

public function attributeLabels()
{
    return [
        'access_token' => 'Access Token',
        'client_id' => 'Client ID',
        'user_id' => 'User ID',
        'expires' => 'Expires',
        'scope' => 'Scope',
    ];
}

to

public function attributeLabels()
{
    return [
        'access_token' => Yii::t('oauth2-server', 'Access Token'),
        'client_id' => Yii::t('oauth2-server', 'Client ID'),
        'user_id' => Yii::t('oauth2-server', 'User ID'),
        'expires' => Yii::t('oauth2-server', 'Expires'),
        'scope' => Yii::t('oauth2-server', 'Scope'),
    ];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants