I've attached Leaflet draw js library to my site. I've modified that JavaScript file by wrapping UI texts in Drupal.t()

It took a while before these texts were available in translation interface (repeating drush rr, cc all etc.).

However, translated texts aren't shown in the UI (map page). Now I'm wondering that should I just localize this script either by a create language file for each language or by adding translations into script itself(object)?

Basically there's no need for Drupal translation so this would do the trick since "The Drupal way" seems bit of a dead end.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.