JS-Translator
JS-Translator copied to clipboard
Js with variables
How to scan js with variables? eg: translate("string" + test['status'] );
currently it gives a exception
The scanner doesn't know the value of test['status'] so it cannot get the translation id.
If you need to add dynamic values in your translations, use the second argument:
translate('string :status', {':status': test['status']});
or sprintf syntax:
translate('string %s', test['status']);