Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
How can I translate the strings which come from javascript code? I'm using Finnish with the editor and the translation is good, but when I added the Embed Media plug-in, it's not translated. Can I translate it myself somehow? I know that strings from javascript cannot be translated with Drupal.
Comments
Comment #1
mephir CreditAttribution: mephir commentedStrings from Mediaembed plugin are in ckeditor.pot. You can translate them by Drupal translations.
Comment #2
mErilainen CreditAttribution: mErilainen commentedOkay, I can see them in the ckeditor.pot file, but how to get them to Drupal's database to translate them with the translation interface? I don't need to import the whole .pot file because the editor works otherwise ok with Finnish. It also seems so that the name of the button is not included in the strings, "Embed Media" is missing.
And where does the editor get all the translations for buttons and dialogs? I've never imported any .po language file related to CKeditor.
Comment #3
wwalc CreditAttribution: wwalc commentedWe have used Drupal system to translate strings in plugins (one big .po file). CKEditor have it's own translation system which we can also use in plugins (by providing small javascript files for each language), I'm not sure which way is better.
Comment #4
wwalc CreditAttribution: wwalc commentedComment #5
dczepierga CreditAttribution: dczepierga commentedMaybe it will be changed in version 6.x-2.0 of CKEditor module.
Comment #6
jcisio CreditAttribution: jcisio commentedRelated to #1966798: Replace usage of ckeditor_path('url') with drupal_add_js.