I am using the Polylang plugin and I have an issue with the heading-section of every section of the home. They aren't translating.
I've found this solution in the internet, but I am only capable of stablish the custom string, but not to work in the home template.
I don't know where to put the "pll__($string);" to make the translation work. Could you help me?
The theme recommends the use of PoEdit to translate the theme like in the attached docs.
The section titles can be found on the following file:
fox\home.php line 136 - there is a span tag there. That is the title.
and also on the same file like 225 - there is another span there that contains the text for the section.
You can make you modifications from there.Hope this clears things up.
Attached files: FoxDocumentation.pdf
I think that I haven't explain myself well. I don't want to translate the theme, I want to translate in this case each H3 (i.e.: "Interviews") that I have put in the customizer in the "Heading text" box of the sections of the homepage, just to appear, when I choose the Spanish language the same word but in Spanish (i.e.: "Entrevistas").
Its not exactly simple since those section titles are not translatable by default.
The code you showed us would allow polylang to translate the strings and we were under the impression you knew how to make the modification and that is why we direct you to the file you need to edit i.e. where the section titles are on the theme files.
Could you please implement that.
Yes I know how to make the modification but I don't know how to make it work . I don't know how to put the "pll__($string)" to show up the translation.
The problem for me is that the function generates each heading with <span><?php echo esc_html(get_theme_mod('bf_' . $i . '_heading'));?></span> but I don't know how to change this with "pll__($string)".
Hope you tried something like this:
<?php echo esc_html(pll__(get_theme_mod('bf_' . $i . '_heading')));?>
Please try that.There is some documentation here on the use of that method: - https://polylang.wordpress.com/documentation/documentation-for-developers/functions-reference
Sorry for answering late! It works fine!!! Thank you very much!