Translating "Home" in breadcrumbs

Hi!

I’m using breadcrumbs on my site (www.songdans.no), and I’ve tried to use Loco Translate to translate the term “Home” to my own language but to no avail. Any suggestions?

There’s no breadcrumbs on the front page, but here’s an example page where it is used: http://www.songdans.no/hendingar/stordanskveld-i-oslo/

Hi there,

The Breadcrumbs element seems not to work correctly with locotranslate. You need to use the official method explained here:

The label you should search for in POEDIT software as explained in the link is Home :

Thank you.

Which one should I be editing?

__x__.pot
x.pot
pro.pot

Hi there,

It should be pro.pot but that’s just a template where you need to generate __x__-{lang}.po and __x__-{lang}.mo from. So the resulting language files should be this example

__x__-de_DE.po
__x__-de_DE.mo

Thanks.

Alright, I’ve used the pro.pot to create __x__-nn_NO.po and __x__-nn_NO.mo, changed both the “Home” and “Home Label” translation to “Heim”, uploaded the files to /wp-content/themes/pro-child/framework/lang, added the code to functions.php in the child theme (yes, the child theme is activated), flushed cache, but still no change…

Hi there,

Would you please kindly get back to us with the URL/User?pass of your WordPress dashboard and the FTP credentials so that we can take a look on the matter?

You will need to give us the information using the Secure Note functionality of the post:

Thank you.

Added it now :slight_smile:

Hi there,

It should be __x__-nn_NO.mo and __x__-nn_NO.po and not nn_NO.mo or nn_NO.po when added to the child theme. But yes, it’s not taking effect and it should work so there must be something is preventing it. It’s added as an element, so it could be due to transients (internal cache).

So instead, I added this code to your child theme’s functions.php

add_filter('x_breadcrumbs_data_args', 'change_home_label', 9999);

function change_home_label ($args) {
	$args['home_label'] = 'Heim';
	return $args;
}

And it works and since it’s PHP, simply clearing the standard cache works.

Thanks!

1 Like

Thanks! :smiley:

You’re most welcome!