vendredi 15 novembre 2019

Display script based on site language

I would like to display different chat widget based on site language.

The standard code is:

<?php

if ($current_lang == "en") {
    echo '';
} else if ($current_lang == "de") {
    echo '';
} else {
    //any other languages?
}
?>

How to add javascripts code to each language. Using 'echo' it won't be good i think so. Should I add each script to file and refer to it here. Please show code example.

Aucun commentaire:

Enregistrer un commentaire