WPtouch in french – update 1.9.19.14
You can find the translation for the news version 1.9.19.14 on the WPtouch page on my website.
The multi-language seems now ready to use out the box with WPtouch (without the need of my “patch”). You have just to put the .po file into the folder wptouch/lang/src and the .mo file into wptouch/lang.
And if you want to manage simultaneously different languages (like on my site), I recommend WPML ! It works like a charm and it’s quite easy to add the links in wptouch/themes/default/header.php to switch from language to another.
Hi there
Would you be willing to share the code you used to add WPML to wptouch. I would be very very grateful.
Thanks
Jeremy
Hi Jeremy,
What do you want to know exactly ? How I’ve added a “flag menu” in WPtouch to switch between french/english on the mobile/iphone version on my website ? You will find below my “patch” to wptouch/themes/default/header.php
<?php
$languagesWPML = icl_get_languages('skip_missing=0');
if(!empty($languagesWPML)){
foreach($languagesWPML as $l){
if($l['country_flag_url']){
if(!$l['active']) {
echo '<a id="'.$l['language_code'].'_off" class="top" href="'.$l['url'].'" rel="nofollow">'.$l['native_name'].'</a>';
} else {
echo '<a id="'.$l['language_code'].'_on" class="top" href="'.$l['url'].'" rel="nofollow">'.$l['native_name'].'</a>';
}
}
}
}
?>
Regards
Guillaume
Thanks Guillaume
You sent me the right code. I am using wptouch pro with their templates. I can’t see the header file anywhere. Any ideas?
Also the footer flags don’t seem to work. Do you know what to do to get them to work?
I really appreciate your help. You are the only one online that I have found making the join between wptouch and wpml.
Jeremy
Thanks Guillaume
I managed to find the header file and put in the code. Now I have the countries in English words but no flags. How do I change to flag? Also the countries do not change the language. They stay in English.
I really appreciate your help. You are the only one online that I have found making the join between wptouch and wpml.
Many thanks
Jeremy
Hi again
I have managed to figure out how to get this to work.
Thanks for your help
Jeremy
@Jeremy Smith
Hi Jeremy !
So, now all is working fine for you too ? Good job.
You can test my own website in mobile version with the help of the “User agent switcher” for Firefox. You will see that I use a simple CSS file to add a picture flag before the words “english/français” (using the id in the <a> to switch between off/on status) with the “image sprites” method to reduce the bandwith usage (it’s important to optimize this when you develop for mobile device) :
http://www.w3schools.com/css/css_image_sprites.asp
Guillaume
Hi Guillaume
Once again i have a question for you. How do you get the menu in wptouch to change depending on the WPML language?
Many thanks
Jeremy
@Jeremy Smith
Sorry I don’t understand your problem… All was already discussed in my previous comment : look at : http://www.desclaux.fr/en/2010/11/08/wptouch-in-french-%E2%80%93-update-1-9-19-14/#comment-3085