The Drupal t() function - in JS

We all know that Drupal has a t() function for translation of strings while doing custom development. But did you know that drupal also has a javascript equivalent of the same?

In your js/ jquery code, you can do something like this:

Drupal.t("Hello");

 

Tags