This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 5 replies, has 2 voices.

Last updated by Amir 10 years, 1 month ago.

Author Posts
August 25, 2009 at 7:09 pm #11879

Pieter

Hi all, I'm currently struggling with a problem where I need different php depending on the language.
I am using the mailing-list plugin and with that plugin it is possible to have multiple mailing lists. Great I thought for my multilingual website. The support overthere however is very bad or maybe I am just spoiled with the great support overhere... 😀
anyways... on the English site I would need

<?php $wpMail -> hardcoded(1); ?>

to show up in my footer and on the Spanish site it would need to become

<?php $wpMail -> hardcoded(2); ?>

.
I have tried to accomplish this with PO Edit, even using

& l t ;

instead of

<

but to no effect.
Does anyone know of a workaround?
Thanks,
Piet

August 25, 2009 at 9:28 pm #11881

Amir

Hi Piet,
You can write a function that will check

ICL_LANGUAGE_CODE

and do the mailing list output according to it.
Which plugin are you using for that? (paste the link to the WP page)

August 25, 2009 at 9:42 pm #11882

Pieter

Hi Amir,
Thanks, this indeed seems to do the trick! At least I get the people subscribed to the correct list. After subscription, the page however returns to the English version, but that will be a problem within that mailinglist plugin.
Ironically the plugin uses wpml... it is a paid plugin and you can find their stuff on:
hidden link

August 25, 2009 at 9:51 pm #11883

Amir

I'm in contact with Lester Chan, who's doing the <a href="http://wordpress.org/extend/plugins/wp-email/">WP-EMail</a> plugin. From the way his other plugins work (like WP-polls, which we're using), I would imagine that his email plugin should run smooth as well.
Lester is planning to add multilingual support via WPML to his plugins.
You're welcome to drop him a note in his forum about this. I can only serve to speed things up.

August 25, 2009 at 10:04 pm #11884

Pieter

The WP-Email plugin however does something different alltogether. With Lester's plugin you can enable your visitors to send an email about an interesting Post to a friend.
The mailing-list plugin works similar to FeedBurner, but it is different in the way that you can choose to send an email newsletter, separate from your Posts, to the subscribers. Whereas with FeedBurner everything you publish on your website will also be published on the RSS.

August 25, 2009 at 11:05 pm #11885

Amir

Thanks for the explanation. For what it's worth, I've just contacted Tribulant and offered them to help. If they respond, I'll be happy to work with them to make their plugins multilingual-ready.

The topic ‘[Closed] need to get different php depending on language’ is closed to new replies.