Language switcher 2

3 posts by 2 authors in: Forums > CMS Builder
Last Post: October 3, 2014   (RSS)

By mattbcd - October 3, 2014

Hi Carlos

I created two flag buttons, an English and German, which had href links applied of ?lan=eng and ?lan=de respectively.  This has the effect of adding a query to the URL, which is then picked up by the code. Now if you click on the English flag, you set the cookie to eng, likewise for German.

Matt

Thanks Matt

What I didn't know was how was the query added . But I did it with an if statement and a list record.


<?php if ($langRecord['lan'] == 'de'): ?> <?php $_COOKIE['lang Cookie']="de" ;?> <?php endif ?>


Thanks for answering!