Use translations in JS

Translations are working fine server side, but they would also be useful clientside. We could make this happen by encoding a specified language and category to a json string and append it to the page. Then use a jquery plugin to translate strings within the code. The plugin knows the current language and is able to translate any string in realtime. We could use a function like Yii:t(‘my string’) and have it translated into the current language.

Off course, the yiic translation tool should be able to recoginize the javascript translations while generating the translated files.