- This topic has 19 replies, 4 voices, and was last updated 6 years, 2 months ago by
Tom.
-
AuthorPosts
-
March 31, 2016 at 11:07 am #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?
March 31, 2016 at 10:19 pm #183330Tom
Lead DeveloperLead DeveloperHi 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.
April 1, 2016 at 6:36 am #183411Branislav Pakic
Thanks!
April 1, 2016 at 10:38 am #183483Tom
Lead DeveloperLead DeveloperOut of curiosity, can you see if this plugin works?: https://wordpress.org/plugins/polylang-theme-strings/
April 1, 2016 at 2:52 pm #183524Branislav 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?
April 1, 2016 at 5:56 pm #183555Tom
Lead DeveloperLead DeveloperBeen 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/
April 2, 2016 at 12:37 am #183632Branislav 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!
April 2, 2016 at 10:41 am #183702Tom
Lead DeveloperLead DeveloperAwesome, I’ll work towards adding compatibility to core π
Thanks!
January 31, 2017 at 12:59 am #272119Vsevolod 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?
January 31, 2017 at 10:00 am #272426Tom
Lead DeveloperLead DeveloperI just made some changes to work with the new Customizer copyright field: https://gist.github.com/generatepress/c662c1002e66f86a7cf42e084305a4db
Let me know how it goes π
January 31, 2017 at 6:30 pm #272627Vsevolod 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.January 31, 2017 at 6:33 pm #272628Tom
Lead DeveloperLead DeveloperYou’re welcome π
January 31, 2017 at 6:43 pm #272629Vsevolod Serbin
I’m sorry, not sure if you’re rieciving updates from edited messages. Can you please check the previous message?
January 31, 2017 at 7:46 pm #272634Tom
Lead DeveloperLead DeveloperSo 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?
January 31, 2017 at 8:08 pm #272640Vsevolod 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. -
AuthorPosts
- You must be logged in to reply to this topic.