You have created the widget in the namespace yii\widgets
BUT
You have tried to import it from frontend\widgets, which is why you have the error.
The use statement needs to refer to the namespace and the class needs to be in a suitable location so that Yii can use the namespace to locate the correct folder to read the widget from.
If it is your widget, you can put it in frontend\widgets\WLang.php but then you need to set the widgets namespace to be frontend\widgets.