• Resolved azraelGG

    (@azraelgg)


    Hi,

    I noticed that Im unable to translate some of the stuff (example media.js) file has hardcoded values that I would like to translate with WPML, can you help me how to add code that will enable translation of these strings example of media.js file

                        jQuery("body").append("<div class='folder-media-popup-form' id='custom-folder-media-popup-form'></div>");
                        jQuery("#custom-folder-media-popup-form").append("<div class='media-popup-form' id='custom-popup-form-content'></div>");
                        jQuery("#custom-popup-form-content").append("<form action='#' id='folder-media-popup-form' method='post'></form>");
                        jQuery("#folder-media-popup-form").append('<div id="add-update-folder-title" class="add-update-folder-title">Add new folder</div>');
                        jQuery("#folder-media-popup-form").append('<div class="folder-form-input"><input id="media-folder-name" autocomplete="off" placeholder="Folder name" class=""></div>');
                        jQuery("#folder-media-popup-form").append('<div class="folder-form-errors" id="media-form-error"><span class="dashicons dashicons-info"></span> Please enter folder name</div>');
                        jQuery("#folder-media-popup-form").append('<div class="folder-form-buttons"><button type="submit" class="form-submit-btn" id="save-media-folder" style="width: 106px">Submit</button><a href="javascript:;" class="remove-media-form">Cancel</a></div>');
                        jQuery("#media-folder-name").focus();

Viewing 1 replies (of 1 total)
  • Plugin Support Karina

    (@karinapremio)

    Hey there, thanks for reaching out. I’d recommend using the .po and .mo files with a 3rd party plug-in such as Loco Translate to translate strings. Please let me know if you were able to set it up.

Viewing 1 replies (of 1 total)
  • The topic ‘translating JS files’ is closed to new replies.