Language pulldown menu isn't updating cookie
-
Hi there,
Recently bought your plugin, and love it. But I am trying to add a little extra functionality to my website based on the language being displayed.
I see there is a cookie called prisna-wp-translate-dropdown-prisna-translate-to ….but it only seems to be updated if you go a explicit call to the language.
Ie: going to http://www.website.com/gr/ DOES set the cookie to the right language
going to http://www.website.com and clicking on the pulldown option for gr does NOT set the cookie.Is there anyway to make that update to the cookie happen for both methods of displaying the content? Or can I set the pulldown to actually go to the explicit url (www.website.com/gr/), instead of transparently changing the text, but not the url.
Thanks again for a great plugin, hope to hear from you soon 🙂
David
-
Actually, the more I think about what I am wanting to do, the more I realize the easier answer is likely how do I have the language extensions in the dropdown urls?
ie: for spanish….www.website.com/es/ etc
Hello,
I’m not entirely sure if I understand correctly what do you intend to do.
how do I have the language extensions in the dropdown
I believe you’d like the drop down to have links to open URLs instead of performing the translations without reloading the page.
If so, that feature is not available in the plugin. If you have enabled the SEO settings and you’re using Pre path as URL modification mode, the URLs will have that form:
/es/
/fr/And so on. But this is a feature only for search engines and it’s not intended to be used on the front end by visitors.
You also wrote:
going to http://www.website.com and clicking on the pulldown option for gr does NOT set the cookie.
Clicking on a language from the drop down will set that cookie. If it doesn’t set it, check the following setting (enabled by default):
General > Interface > Remember the selected language for auto-translate
Since these questions aren’t related with this plugin, if you require further information please contact us directly:
https://www.prisna.net/contact-us/
Regards
That rememeber the selected language for auto-translate does exactly what I need, thank you.
The functionality I am trying to incorporate involves pdfs…when someone goes to a particular language we have pdf catalogs in that language, I’m trying to have the page change to display the appropriate pdf.
Since the code is obfuscated (which I can appreciate), I plan on using the cookie settings to help me with this.
Thank you again for your speedy reply and excellent plugin.
Have a great week!
David
Glad to know the answer is useful for you, and thanks for closing the support thread.
Know that you can show or hide different content depending on the selected language.
There’s a shortcode, you can use it with a graphic interface whenever you see the rich content editor, for instance, if you create/edit a page/post, for instance: /wp-admin/post-new.php?post_type=page, you’ll see a Prisna Translate drop down with a few settings to show or hide the selected content, check it out.
You should also notice that whenever a translation is made, the main body tag gets a new style class assigned, which contains the language code, so you could also show or hide your content defining CSS rules using these class names.
Regards
The topic ‘Language pulldown menu isn't updating cookie’ is closed to new replies.