Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a template file where I have a string. I would like to translate it, using WPML - Multilingual Blog.

My setup is a following:

functions.php

##################################################################
# Language 
##################################################################
icl_register_string("template_fullwidth", "relatedSubjects", "Se relaterede emner:");

in my template file:

<?php echo "<h3>".icl_t("template_fullwidth", "relatedSubjects", "Se relaterede emner:")."</h3>"; ?>

When i go to the backend interface and enter the translation and press save the "spinning wheel of death" appears and nothing happens, see image.

Image: https://lh6.googleusercontent.com/-paBv76Z3db8/UekaeUjtu6I/AAAAAAAAMoc/PQLV3n2XkO4/w685-h192-no/WPML.png (The spinning wheel of death is on top of the word "Related" in the translations field)

In my JS console i get the following messages:

Warning: The page at https://<sitename>/wp-admin/admin.php?page=wpml-string-translation/menu/string-translation.php#icl-st-toggle-translations displayed insecure content from http://<sitename>/wp-admin/admin.php?page=sitepress-multilingual-cms/menu/languages.php.
 [VM] admin.php?page=wpml-string-translation/menu/string-translation.php (1428):1
Error: Failed to load resource: the server responded with a status of 404 (Not Found) https://dev.studerende.dk/wp-admin/images/gray-grad.png
2
Error(2): Uncaught TypeError: Cannot read property 'parentNode' of undefined load-scripts.php?c=0&load%5B%5D=jquery,colorpicker,utils&ver=3.5.2:5
Warning: The page at https://<sitename>/wp-admin/admin.php?page=wpml-string-translation/menu/string-translation.php#icl-st-toggle-translations displayed insecure content from http://<sitename>/wp-admin/admin.php?page=sitepress-multilingual-cms/menu/languages.php.
 [VM] admin.php?page=wpml-string-translation/menu/string-translation.php (1428):1

What am i doing wrong? And how do I make it translate my string?

share|improve this question
    
Which version of WPML and WPML add-ons have you installed? The second error about parentNode is unrelated by the way: the actual issue is in the first error, where it seems WPML String Translation is trying to load a script with the wrong protocol (http rather than https). Anyway, I'm pretty sure the issue has been already fixed in the most recent versions. –  Andrea Sciamanna Mar 10 at 22:38
    
I am no longer working on this project, and have no way to provide additional information og apply a solution. –  Kim A. Jakobsen Mar 11 at 7:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.