Doug Wollison
Forum Replies Created
-
Forum: Plugins
In reply to: [nLingual] Bulk editHi, sorry I’ve been slammed with must-launch-before-christmas projects all month.
I R&D’d some of this on an english/french site I have, and figured out a hack that should reliably disable the browser language detection. I promise the next update to nLingual will have options to better control how language detection/redirection works, as well as more filters for manipulating stuff in a less bludgeon-y way.
Put this in an mu-plugins file (recommend creating a new one, call it nlingual-patches.php or something).
<?php // Prevent nLingual from using the browsers accepted language unset( $_SERVER['HTTP_ACCEPT_LANGUAGE'] );That should do the job without breaking anything. Skip Default Localization will be maintained as nLingual won’t be able to detect the browser’s language without that header’s data being available. If croation is set to the default language you should be able to view it without /hr/.
Regarding your question about functions.php, most filters can be used there but some apply to code like language detection which runs before your theme code is even loaded (wordpress loads mu-plugins, plugins, child theme, then parent theme).
[Edit: Wow I accidently posted this from my alt account]
- This reply was modified 5 years, 5 months ago by Doug Wollison.