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:
How to translate header adds in the newspaper theme
Solution:
Since this is a theme string, we need to register it as admin string. You would do it like this:
- WPML -> string translation -> Translate texts in admin screens » (bottom)
- While there, Locate ( a bit cryptic name) td_011
-- within td_011, there is td_ads where You need to select header -> ad_code ( you can recognise by the code which it contains)
- Put a checkmark next to it and then on the top of this page, click "Export selected strings as a WPML config file that can be added to themes or plugins" and wait for a few seconds
- you will see some XML code being generated, in our case it was this one:

<wpml-config>
	<admin-texts>
		<key name="td_011">
			<key name="td_ads">
				<key name="header">
					<key name="ad_code"/>
				</key>
			</key>
		</key>
	</admin-texts>
</wpml-config>

- Put this code into WPML -> settings -> Custom XML configuration
- You can find this code within string translation now and Translate it accordingly
Relevant Documentation:
https://wpml.org/documentation/support/language-configuration-files/

This topic contains 6 replies, has 2 voices.

Last updated by paulD-2 3 months ago.

Assigned support staff: Bruno Kos.

Author Posts
July 15, 2019 at 1:09 pm #4211331

paulD-2

Hi Bruno,

Once again apologies for the delay. Yes, one more thing. We do require a banner to be different between NZ and AU regions. This is achieved through the theme: Newspaper > Theme Panel > Ads > Header Ads. But it seems the two languages are using the same theme values (so changing the banner address in AU overwrites NZ and vice versa).

Hopefully it's a simple fix.

Many Thanks

July 15, 2019 at 1:18 pm #4211357

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Thank you for contacting WPML support!

Since this is a different topic, let me split this one so that other users can benefit from this. I was able to translate this - in fact, I made it translatable so that you can do it. Since this is a theme string, we need to register it as admin string. You would do it like this:
- WPML -> string translation -> Translate texts in admin screens » (bottom)
- While there, Locate ( a bit cryptic name) td_011
-- within td_011, there is td_ads where You need to select header -> ad_code ( you can recognise by the code which it contains)
- Put a checkmark next to it and then on the top of this page, click "Export selected strings as a WPML config file that can be added to themes or plugins" and wait for a few seconds
- you will see some XML code being generated, in our case it was this one:

<wpml-config>
	<admin-texts>
		<key name="td_011">
			<key name="td_ads">
				<key name="header">
					<key name="ad_code"/>
				</key>
			</key>
		</key>
	</admin-texts>
</wpml-config>

- Put this code into WPML -> settings -> Custom XML configuration
- You can find this code within string translation now and Translate it accordingly

In case you will add more ads ( or some other theme settings), you will be able to find it through the same way, by exporting XML and adding it to the WPML settings.

Regards,
Bruno Kos

July 15, 2019 at 2:05 pm #4212003

paulD-2

Hi Bruno,

We are actually using that solution to make the changes but team members are finding it too complicated and would prefer to switch the language from NZ to AU (or vice versa) in the dashboard and enter the banner image address in the theme's Theme Panel. Is that possible..? We can duplicate the default .po and .mo files from the theme and rename to en_NZ.mo and en_NZ.po for New Zealand based theme management.

Regards

July 15, 2019 at 2:43 pm #4212303

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

String translation would be the only way to translate admin strings I'm afraid. As for trying it with .MO files, these files usually contain theme strings and not theme options, but I have not tried with this particular theme. Also, some themes register these options automatically.

There are some themes (I stumbled upon a theme recently, I don't remember the name but I think it was related to property listings) which in fact had this option where you could change the admin language thus changing options individually for each of the languages. Perhaps even Avada can do this, but I have not tested these themes so I cannot give you precise information (Since every theme handles this differently).

Regards,
Bruno Kos

July 15, 2019 at 3:00 pm #4212625

paulD-2

Thanks Bruno,

Yes, I've achieved this before in Avada. I'll contact the theme developers to see if there is a workaround.

One last thing before we mark this as resolved. Could you remove the above screen grab 's-translation.jpg' as it contains our website address..?

Thanks for all your help.

July 16, 2019 at 5:47 am #4216475

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

No problem, I removed all the images.

Regards,
Bruno Kos

July 19, 2019 at 2:13 am #4242997

paulD-2

My issue is resolved now. Thank you!