[Resolved] Copyright and menu labels in multi language site

Home Forums Support [Resolved] Copyright and menu labels in multi language site

Home Forums Support Copyright and menu labels in multi language site

Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • #183231
    Branislav Pakic

    I have a multi language site (English and Serbian) where I use Polylang. I also have GP Premium. My problem is that I don’t know how to translate the Menu Plus Mobile Menu Label and Copyright text to both languages. Can that be done?

    #183330
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Let me look at their documentation to see if there’s something I can do to allow the plugin to recognize those custom strings.

    I’ll update this thread.

    #183411
    Branislav Pakic

    Thanks!

    #183483
    Tom
    Lead Developer
    Lead Developer

    Out of curiosity, can you see if this plugin works?: https://wordpress.org/plugins/polylang-theme-strings/

    #183524
    Branislav Pakic

    It doesn’t do anything out of the box. Maybe the copyright text and menu plus label need to be registered as strings in function.php? If that makes sense how can I do that?

    #183555
    Tom
    Lead Developer
    Lead Developer

    Been working on this.

    Can you try this PHP?: https://gist.github.com/generatepress/c662c1002e66f86a7cf42e084305a4db

    If it works, I’ll add the other strings and make it compatible in core.

    Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/

    #183632
    Branislav Pakic

    It works!
    I can now translate the menu label.

    I know I’m not the first to say it, but your support is top-notch!

    #183702
    Tom
    Lead Developer
    Lead Developer

    Awesome, I’ll work towards adding compatibility to core πŸ™‚

    Thanks!

    #272119
    Vsevolod Serbin

    Hello, Tom!
    I’ve faced the same issue with translating copyright section with polylang. After adding your code (https://gist.github.com/generatepress/c662c1002e66f86a7cf42e084305a4db) in code snippet I’ve found only GeneratePress Mobile Menu string in polylang settings.

    Is there a way to translate the copyright?

    #272426
    Tom
    Lead Developer
    Lead Developer

    I just made some changes to work with the new Customizer copyright field: https://gist.github.com/generatepress/c662c1002e66f86a7cf42e084305a4db

    Let me know how it goes πŸ™‚

    #272627
    Vsevolod Serbin

    Tom, this is great!
    Everything works fine. Thank you a lot!
    UPD
    I’ve rushed a liitle bit with this. I can see the copyright string in polylang settings, but it seems like copyright in customizer overrides this. When I’m cleaning copyright text in wordpress customizer it drops to default (generatepress etc) and ignores what I’d put in polylang.

    #272628
    Tom
    Lead Developer
    Lead Developer

    You’re welcome πŸ™‚

    #272629
    Vsevolod Serbin

    I’m sorry, not sure if you’re rieciving updates from edited messages. Can you please check the previous message?

    #272634
    Tom
    Lead Developer
    Lead Developer

    So you’re clearing the value from the Customizer? Wouldn’t you add the copyright to the Customizer, and then adjust that string in Polylang for multiple languages?

    #272640
    Vsevolod Serbin

    Okay, I did some tests πŸ™‚
    Seems like using %copy% or %current_year% and inline style breaks translation. If I put these into customizer languages aren’t swithching for copyright section. For instance:

    <a href="http://tsu.ru/">TSU</a> Institute of the Human of the Digital Era - works
    <div style="text-align: left;">%current_year% %copy% <a href="http://en.tsu.ru/">TSU</a> Institute of the Human of the Digital Era</div> - nope

    UPD
    Inline styles are fine. Only code like %copy% is causing troubles.

Viewing 15 posts - 1 through 15 (of 20 total)
  • You must be logged in to reply to this topic.