Jump to content
janpeeters

Non-translation strings when using Polylang

Recommended Posts

janpeeters

Hi,

I'm using Polylang to translate my originally Dutch site into English. It works mostly very very well. A few strings don't translate however: site tag line and the post metabar. I contacted the developer of Polylang and he told me the following:

If the theme or a plugin uses the standard WordPress function to display the site title and the tagline (as of course themes developed by the WordPress team do!), then Polylang knows that it must translate these strings and so you can translate theme in Settings->Languages->Strings translations.

However, if the theme or a Plugin uses another way, then Polylang can't know by itself, so the theme or the plugin must inform Polylang about the string to translate.

This is done by the functions pll_register_string on admin side and pll__ . There are several examples in the forum on how to adapt themes or plugins (as well as some links in the doc).

When he gets to 'This is done by…' I've lost him. So hopefully someone has experience with this and can point me in the right direction.

Thanks, Jan

www.janpeeters.nl

Share this post


Link to post
Share on other sites
Simon

We use wp_title() filter and bloginfo( 'description' ) as per the wordpress theme standards.

Share this post


Link to post
Share on other sites
janpeeters

Hi Simon, I had to get back to Chouby, the Polylang dev. He answers the following:

wp_title, bloginfo('name') and bloginfo('description') should be correctly translated by Polylang except if a plugin overwrites what Polylang did before the theme displays.

And for me, it works with the combination I tested: WordPress SEO + Polylang + Twenty Ten

I did test with all plugins deactivated and only Pagelines Framework and Polylang activated.

Could you bend your mind once again as to how this could be possible?

I've considered WPML but it's above my budget at the moment, so I'm really trying to get Polylang to work. People are mostly very enthusiastic.

Thanks, Jan

Share this post


Link to post
Share on other sites
janpeeters

Hi, I thought I report back.

The latest Polylang development build solves the problem of the SIte title and tagline Chouby wrote:

I use the bloginfo filter to translate these strings. However you can try another filter which may work better with your theme (if they directly use get_option instead of bloginfo).

Later he posted a link to a new dev build that solved it.

The Metabar still doesn't so I'll contact him about that too.

Jan

Share this post


Link to post
Share on other sites
Rob

Great! I will resolve this. If you have further difficulties, please open a new topic and reference this one!

All the best!


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
Rob

The topic was marked as resolved.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Similar Content

    • DonRicardoRVM
      By DonRicardoRVM+
      ¿Where can  I translate the english items "Orders", "Adress", "Payment Methods". "Edit Account" and "Sing Out"of the my account page of the plugin Quickshop? In the po file they are not.
      I think that it have relation with this error: "Your theme version of my-account.php template', '2.6', 'the latest version, which supports multiple account pages and navigation, from WC 2.6.0".

      I use the Frame Work Pagelines´s Child theme for platform 5.

    • fabienfons
      By fabienfons+
      Hi,
       
      I'd like to translate my website in french. (platform 5)
      How can i do ?
      Thanks
      Fabien
    • Audun MB
      By Audun MB+
      Are there any instructions for this? Seems like the plugin use standard .mo/.po for translation, but how do I prevent my language file from being overwritten with updates?
      Support for different number and currency formats in sections is also missing. For me this is an issue with Boxes. I can't use the counter with the current format (thousands separator), it looks really odd in Norwegian (and a lot of other languages). 
       
    • achim
      By achim
      There is no language key 'Read More <i class="icon icon-angle-right"></i>‘, so this wouldn’t translate:
      dms/sections/postloop/section.php#282
      - __('Read More <i class="icon icon-angle-right"></i>', 'pagelines') + __('Read More', 'pagelines').' <i class="icon icon-angle-right"></i>'
    • vogelwild
      By vogelwild
      Hi all  
      I'd love to get a recommendation regarding DMS 2 and a multilingual language website that I'm going to build.
      How would you setup such a WordPress website with Pagelines DMS? What are your experiences with plugins and DMS 2?  Last time it was a bit complicated. I used WPML, but of course had problems with translating e.g. content which was stored in DMS sections. So I tried to work with widgets which was great for WPML but "not so" for the look and feel  Any hints or tricks?
      Thank you!!
      P.
×