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 URL's 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 lets show the content in this language? Can someone help me out? Thanks.
Aucun commentaire:
Enregistrer un commentaire