Yann74 Posted September 6, 2015 Share Posted September 6, 2015 Bonjour à toutes et à tous ! :-) Savez-vous s'il existe une fonction Php qui permet simplement de dire : - si la langue est fr, alors j'affiche tel html - si la langue est en, alors j'affiche tel html - etc... - sinon, j'affiche la langue par défaut : fr Merci d'avance :-) Link to comment Share on other sites More sharing options...
Mediacom87 Posted September 7, 2015 Share Posted September 7, 2015 Bonjour, cela dépend où se trouve votre code à afficher. dans un fichier php de module par exemple vous pouvez utiliser le context sinon sur un tpl vous pouvez tester la variable smarty $lang_iso (http://www.prestatoolbox.fr/content/22-global-smarty-prestashop) Link to comment Share on other sites More sharing options...
Yann74 Posted September 7, 2015 Author Share Posted September 7, 2015 Merci pour ce retour, j'ai utilisé la variable $lang_iso sur des images : mon_image_$lang_iso.jpg grâce à ça j'ai une image différente selon la langue choisie par l'internaute Ce que j'aimerais faire dans un fichier tpl c'est dire que selon la langue choisie, il devra y avoir tel ou tel contenu affiché. Exemple : <div class="horaires-ligne-tel"> <!--langue fr --> <p>L-V 9h-12h/14h-19h</p> <!--langue en --> <p>M-F 9am-12pm/2pm-7pm</p> </div> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now