Ziggi
(Ziggi)
1
Hi,
Class yii\web\Response has a static $httpStatuses array what looks like:
public static $httpStatuses = [
100 => 'Continue',
101 => 'Switching Protocols',
102 => 'Processing',
118 => 'Connection timed out',
200 => 'OK',
...
];
But in my humble opinion it should read:
public static $httpStatuses = [
100 => Yii::t('yii', 'Continue'),
101 => Yii::t('yii', 'Switching Protocols'),
102 => Yii::t('yii', 'Processing'),
118 => Yii::t('yii', 'Connection timed out'),
200 => Yii::t('yii', 'OK'),
...
];
That would allow for easy internationalization of HTTP error page titles.
Rgs,
Ziggi
softark
(Softark)
2
Very few of them make sense to the end users when translated and/or described in detail in their native language:
-
401 Unauthorized
-
403 Forbidden
-
404 Not Found
The rest of the errors can be simplified as:
Yii::t('yii', 'We are sorry, but something went wrong with your request.')
That is, they are all jargons for the web developers. I think there’s no need to translate them.
[EDIT]
Look at the 2nd one in the "Design Decisions".