Search bar display according to the language of the site
-
[ Moderator note: moved to Fixing WordPress. ]
Hello,
I manage a seasonal rental site and my channel manager has provided me with a documentation containing the steps to go through to display a search bar on my site, here is the link: https://alpine-residences.fr/
Currently the bar is displayed correctly only, it is displayed only in french whatever the language chosen on my site. I currently have an English and French version.
The channel manager gave me these codes:
INGLES -------------- <?php echo file_get_contents("https://booking.alpine-residences.fr/rentals/formularioMiniOptimized.php?bk=bk_alpineresidences&Idioma=EN&Fajax=1"); ?> FRANCES -------------- <?php echo file_get_contents("https://booking.alpine-residences.fr/location/formularioMiniOptimized.php?bk=bk_alpineresidences&Idioma=FR&Fajax=1"); ?>
My problem is that I can not make sure that the bar (French version) is displayed for the French site and vice versa.
That’s what I did:
if($_GET['lang'] == "en") { echo file_get_contents("https://booking.alpine-residences.fr/rentals/formularioMiniOptimized.php?bk=bk_alpineresidences&Idioma=EN&Fajax=1"); } else { echo file_get_contents("https://booking.alpine-residences.fr/location/formularioMiniOptimized.php?bk=bk_alpineresidences&Idioma=FR&Fajax=1"); } ?>
Could you help me out and guide me on what does not work in my code?
Thank you in advance for your help!
- The topic ‘Search bar display according to the language of the site’ is closed to new replies.