lajax / yii2-translate-manager

Translation Manager
MIT License
227 stars 90 forks source link

Frontend toggle translate button does nothing. #66

Closed StalkAlex closed 8 years ago

StalkAlex commented 8 years ago

I did everything by instruction. I get button on site page, but clicking on it does nothing. Also no errors in browser console. What else could happen?

moltam commented 8 years ago

Do you have any translatable elements in your page?

Frontend translation works only if you translate the elements with the helper, for example:

use lajax\translatemanager\helpers\Language as Lx;

Lx::t('category', 'Apple');

If there is no element created by this helper method, then the button does not work, because there is nothing that can be translated.

StalkAlex commented 8 years ago

Oh, thanks. I thought Yii:t would be enough.