Skip Navigation

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 topic contains 10 replies, has 2 voices.

Last updated by Izzi Hassan 4 months, 2 weeks ago.

Assigned support staff: Izzi Hassan.

Author Posts
May 1, 2020 at 8:43 am #6036097

Fabio Fava

Q: Tell us what you are trying to do?

A: I need to have different logo images per language.

Q: Is there any documentation that you are following?

A: I've visited all (solved) tickets at WPML Forum but none actually solves my case.

Q: Is there a similar example that we can see?

A: I've duplicated and translated the Home Page (it's the best way with Themeco Page Builder to keep both layout and readability). I've also made Media Translation, uploaded the corresponding images for each language for each version of the Logo (there are 3). All caches (server & WP) disabled, browser cache cleared. But the logo doesn't get changed for the other languages' versions I've uploaded via Media Translation.

Q: What is the link to your site?

A: hidden link

May 1, 2020 at 10:43 am #6036763

Izzi Hassan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

I believe this logo is set in the Theme Options (hidden link) and because of this, the URL is saved in the wp_options table.

These strings are considered Admin Texts and need to be registered with WPML in order to be translated.

Could you try the solution described here:
https://wpml.org/forums/topic/different-logo-image-for-each-language-x-theme/#post-1333148

Once the string is registered, you will be able to find it under WPML -> String Translation.

If that doesn't work, please provide temporary access to your website and I will be happy to take a look.

Best,
Izzi

May 1, 2020 at 1:16 pm #6038037

Fabio Fava

Hello Izzi, thank you for your reply.

I've done all those steps on the link you've provided, and it didn't work. So I've made a copy of the wpml-config.xml file of my theme and added the provided line. As I use a Child-Theme, I'm not sure where should I place the wpml-config.xml file.

I use some customizations on the index.php and the path for the file is /my-child-theme/framework/views/global/_index.php so I assume the wpml-config.xml file should be on this same folder? Or it should be on the "root" of /my-child-theme/ in order to work?

I'll keep looking forward from you on that, thanks!

May 1, 2020 at 2:14 pm #6038321

Izzi Hassan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for your response.

The correct XML, according to the article I shared, would be:

<wpml-config>
  <admin-texts>
    <key name="x_logo"></key>
  </admin-texts>
</wpml-config>

You can add this to your child theme's wpml-config.xml and place the file at the child theme's root folder. WPML will scan there.

You can also try adding it to the field under WPML -> Settings -> Custom XML Configuration.

If it still doesn't work, I can take a look. You will need to provide temporary access for me to do so. I have enabled secure fields on your next response for this purpose.

If you do not wish to share access, I will need to recreate this on our end and that can take some time. Please also understand that due to Labor day and the weekend, support might be a little slow currently.

Stay safe!
Best,
Izzi

May 1, 2020 at 2:17 pm #6038327

Fabio Fava

Sorry you didn't make it very clear... The wpml-config.xml file on the root folder of my child-theme should have only those 5 lines?

I've added those 5 lines to the "Custom XML Configuration" tab and saved. Also created the wpml-config.xml file on the root folder of my Child-Theme.

No success on both scenarios, even having both at the same time. I've created a Dev/Staging Clone of the Site, please ask me again for the protected form I send you credentials, thanks!

May 1, 2020 at 4:22 pm #6038929

Izzi Hassan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

I am sorry for not being clear! I don't have the theme available to me currently and I cannot see the wpml-config.xml files so I am just providing suggestions base on the information I could find online.

Please go ahead and share the credentials. I will take a look and try to set that up for you. I will also let you know how I was able to do it.

Enabling a private response

Thank you!

May 2, 2020 at 10:17 am #6043021

Izzi Hassan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for your response.

I took a look and the logo URL was actually showing up in the String Translation table after you added the code for ". So you were doing it correctly 🙂 In fact, depending on how the theme is coded, in a lot of themes the logo is translated by Media Translation as you would expect.

However, because you are using X PRO, those "Theme Options" for the logo were not being used at all and neither was Media Translation being used. The logo is actually being stored as part of the custom Pro Header you are using.

I did some research and discovered that there isn't really much documentation on translating Pro Headers, Pro Footers and Pro Global Blocks. Thank you for bringing this to our attention and we will fix this as soon as possible. It's quite possible our teams are already working on the documentation for this.

I did find an article online that seems to address this:
hidden link

After setting the "cs_header", "cs_footer" and "cs_global_block" Post Types to "Translatable - use translation if available or fallback to default language", I was able to see the language switcher options show up on your X Pro Header Editor:
hidden link (look in the bottom right)

So now, you should be able to customize that header for each language. If you have any further issues with this, you will need to speak with the X Pro support as this is a feature they have implemented.

About your other issue regarding the taxonomies, they look fine to me. If you mean that some of the "Source Language" are not Spanish, that is ok. The source language simply provides a base for the other languages to be connected to. Some of the taxonomies are already created in English for example, when you install WordPress, so they use English as the base language.

There are some steps you could try in order to update your taxonomy base languages but I would recommend that you leave them as they are, if you are not experiencing any functional issues.

I hope that helps resolve your issue with the logo. If you have any further questions or trouble translating anything, please don't hesitate to reach out again!

Best,
Izzi

May 2, 2020 at 10:24 am #6043117

Fabio Fava

Thank you Izzi.

So, first of all I should undu what I've done. Then it's about to edit the Header & Footer, and changing the flags will allow me to make changes that will reflect per language? Did you test this? Seems like nothing was actually done, and the Catalan home page still shows de Spanish Logo... Sorry I didn't understand very well what, or if, was solved.

May 2, 2020 at 9:46 pm #6044951

Fabio Fava

Hello there,

I've done that procedure on the Live Site and it has worked fine. On the other hand, I really would like to "normalize" al the Taxonomies (at least) to have the Main Taxonomies all in Spanish (with the texts in Spanish), then I translate them properly.

They were already all converted to Spanish, I'm not sure what caused them to get yet again a mess. I would greatly appreciate some help to "normalize" them back to Spanish.

Thank you very much, I'll keep looking forward fon the Taxonomies issue, cheers!

May 3, 2020 at 7:16 pm #6048211

Fabio Fava

Hey there,

On the messed-up taxonomies, I would really like to have it as it was before: all in Spanish. An example is the picture below, you can see 3 different strings for the Translation Priorities. I'm sure I don't need them all, but don't know wich ones can be safely delted.

I'll keep looking forward from you on how to get it all back to Spanis as it was before. Thanks!

May 7, 2020 at 6:59 am #6077043

Izzi Hassan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

I'm sorry, I'm not sure why my response did not come through to you.

I'm glad the logo issue is solved. Please open a new ticket to help you change the original language of the taxonomies so you can get some timely support about that. We try not to handle multiple issues on one ticket as there is a queue of users.

For the multiple strings, that is normal. There will be a lot of similar strings coming from different text domains in your website. You usually will need to identify and translate the correct one or just translate all.

Thank you.