WPML & Pods
Hi there. My client's site was built with Pods 2 years ago and they've now requested it to be translatable with WPML. My conclusion after reading WPML posts is that Pods isn't yet compatible with WPML. Is this still the case?
We can work around it and simply just not translate the parts that have been built with Pods, but how would it affect the urls of the Pods-pages and other elements I might not be aware of?...
3 Answers
I'm building a multi-language site with pods at the moment. There are a few things you have to consider, but in general it works fine.
Your urls with WPML/WP will be in the format mydomain.com/(2 char language id e.g. fr)/slug. Using the standard wildcards in pods, this won't give you any problems.
If you have lang specific data in your pod, one approach is to use the target lang id in the pod field name :-
$accom_tagline = $accom->get_field('tagline_'.ICL_LANGUAGE_CODE);
you can then target the appropriate field using the WPML language constant. In this case the field tagline_fr, tagline_en or tagline_es.
Labels and any other non-dynamic text on the page, you can hit with the standard WP translation functions __() and _e()
echo '<li><label>'.__('Sleeps','roots').'</label><span>'.$accom_capacity.'</span></li>';
WPML will add the texts to the translation.
edited Nov 3 '11 at 6:13
Hi Caroig, I just installed wpml and it is not working correctly for me. Wpml seems to ignore the pods pages urls.
e.g. if i have pod page called wiggles /wiggles/ the language switcher link on that page for spanish shows /es/ instead of /es/wiggles/ . this is like the default action of the wpml plugin when dealing with wp posts that have no translation.
how did you deal with the language switcher?
i am thinking that the only thing to do is create a link that copies the current url and inserts the /es/ into the correct place. Then I will have to deal with the permalinks etc... almost like making a new multi language plugin.
i have ver 1.12.2 of pods, and ver 2.4.2 of wpml
edited Dec 29 '11 at 3:44
We're working with the WPML team to build in some more integration for Pods 2.0 and WPML, we're hoping to cover most common use-cases.


