I have this code I used for my wordpress multi language website. (currently english and french).
To make the translation of a specific part in the footer I used that code :
<?php
/*
$lang = (ICL_LANGUAGE_CODE == 'fr') ? 'fr' : 'en';
$newsletter = (ICL_LANGUAGE_CODE == 'fr') ? 'Infolettre' : 'Newsletter';
$suscribe = (ICL_LANGUAGE_CODE == 'fr') ? 'Abonnez-vous à notre infolettre' : 'Suscribe to our newsletter';
$enter = (ICL_LANGUAGE_CODE == 'fr') ? 'Entrez votre courriel' : 'Enter your email address';
$submit = (ICL_LANGUAGE_CODE == 'fr') ? 'S\'inscrire' : 'Submit';
*/
$about = (ICL_LANGUAGE_CODE == 'fr') ? 'À propos' : 'About Us';
$texte = (ICL_LANGUAGE_CODE == 'fr') ? 'text.';
?>
The thing is, now I wanna make my website trilingual. I want to make it english, french and spanish.
I'm using WPML and the 3 code abbreviation used by the plugin is 'en' 'fr' 'es'
I know I must probably use like js with if and else. But I am not enough expert to do it... Is there anyone who could help me out on this one?
I am open to completely change the code I use up till now, if you have a better way to do this.
Thanks a lot!
A better approach to the problem would be:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.