I have this checkbox which I want to use as a language-switch:
<label class="switch">
<input type="checkbox" class="switch-input">
<span class="switch-label" data-on="DE" data-off="FR"></span>
<span class="switch-handle"></span>
</label>
I have one single index.php
file where the language of the content changes to German if you add ?lang=de
or changes to french if you add ?lang=fr
. Now is it possible to bind each of the URLs to one of the checkbox value? Like if the checkbox isn't checked the param ?lang=de
and if checked, the param ?lang=fr
will be added to the URL and let show the content in this language?