This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This thread is resolved. Here is a description of the problem and solution.

Problem: adding 2 different logos images and translating them via String Translation doesn't work.

Solution: the client added a snippet directly in the child theme's template. See link below

Relevant Documentation: https://wpml.org/forums/topic/trying-to-use-different-logos-for-each-language/#post-4329725

This topic contains 1 reply, has 1 voice.

Last updated by robertR-9 2 months, 3 weeks ago.

Assigned support staff: Laura.

Author Posts
August 2, 2019 at 9:26 am

robertR-9

I am trying to use different logos for each language. I'm using Divi 3.26.6 with a child theme built by myself and WPML 4.2.7.1. I translated the logo in string translation - admin_texts_et_divi [et_divi]divi_logo - and for a while it seems to be working. But after a few minutes both languages show the same logo again. There is no caching plugin active on the site.
ATTENTION: The attached link to the Duplicator backup contains ONLY the database.

Link to a page where the issue can be seen:
hidden link

the site is protected with a htaccess password. You will need these credentials:
username: neu-azetpr
password: azetpr2019

I expected to see: different logos for German and english versions

Instead, I got: the same logo for both language versions

August 2, 2019 at 10:05 am
August 2, 2019 at 11:50 am #4329725

robertR-9

My issue is resolved now. Thank you!
I set the two logos in the template itself and got rid of string translation and Divi's logo setting. My solution:

if(ICL_LANGUAGE_CODE=='en'){
 $logo = $stylesheet_directory_uri . '/images/english_logo.png';
}
if(ICL_LANGUAGE_CODE=='de'){
$logo = $stylesheet_directory_uri . '/images/german_logo.png';
}