Home›Support›English Support›[Resolved] I created a translation of header/footer but it does not update on the Swedish website
[Resolved] I created a translation of header/footer but it does not update on the Swedish website
This thread is resolved. Here is a description of the problem and solution.
Problem:
Client is facing issues with 'Book Training' and footer content not appearing in String Translations, and the footer translation not updating on the Swedish website.
Solution:
We replicated the issue and resolved it by taking the following steps:
1. Edit the file functions.php in the theme folder.
2. Around line 59, replace the function mfn_global() with this one:
3. Navigate to WPML > String Translation > Translate texts in admin screens. Search for "mfn_header_entire_site" for the header and "mfn_footer_entire_site" for the footer template, then add them to string translation.
4. Go to Templates and translate the Header/Footer template.
5. In String Translation, translate the template ID with the translation ID.
If this solution works for you, please inform the theme author so they can include this fix in their next update.
Now the only problem remaining is the Book Training and the content of the Footer not showing up in String Translations. For the footer I created a translation but it does not update on the Swedish website.
3. Go to WPML > String Translation > Translate texts in admin screens > Search for the name "mfn_header_entire_site" for header and "mfn_footer_entire_site" for footer template > Add them to string translation.
4. Go to Templates > Translate the Header/Footer template.
5. Go to String Translation > Translate the template ID with the translation ID.
If it works on your site, please help me report this issue to the theme author to add the fix on their next update.
Strange, it works on my local site and sandbox site also. You can check the code here hidden link
Please share a screenshot or the code after you apply the workaround. Or you can share your site credentials (wp-admin and FTP), I will help you to apply the code. Your next reply is set to private to share the info.
❌ IMPORTANT: Please backup your database and website before proceeding ❌
I did cache reset and it didn't help, then I went to the Swedish translation of the template and updated the whole post, cleared the cache again and the result is better (the same you provided in the screenshot) but it still is not the same as the original, some styles are missing in both the header and the footer.
Can you please recheck the style of elements in the header and footer again? Please check the screenshot attached.
I go to the admin area > Switch to the Swedish language > Edit the translation template and set the style for elements manually as you do in English.
Not sure what you mean entirely, I went to the Templates for Swedish language and all the styles in the builder were correct, but they still don't appear right on the website. You seem to have managed to get the right, result. Did you do anything else?
On my end, the style of the header and footer in Swedish is correct, as you see in the screenshots above. It could be a caching issue on your end. Please try to clear all caches (browser, plugin, CDN ...) and recheck the style.
I tried all of the above, clearing cache multiple times (CDN, Plugins, etc) including on 3 different browsers and same issues persist on my phone and my PC. It only looks correct in Safari on Mac, but Chrome, Brave and Safari on iOS same issue. I have temporarily reverted the string translation of the header and footer IDs since I'm unable to resole it for now.
Edit the template header/footer in Swedish language, set the style as you do with the template in English > Click on Update > Click on Save. These steps will generate a CSS file for the template in the Swedish language, it is located in the folder /wp-content/uploads/betheme/css.
Then you need to go to One.com > Performance > Clear performance and CDN cache. Now you can see it works as well on my end: Chrome browser on desktop and Safari browser on mobile.