latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Multilingual Profile Page

Home Forums Community Forum Multilingual Profile Page

This topic contains 7 replies, has 2 voices. Last updated by  Cristián Lávaque 4 years, 4 months ago.

Topic Author Topic
Posted: Wednesday Aug 29th, 2012 at 9:00 am #23398
Sam Lee
Username: innocsrlee

Hi there – we’re using WPML for a multilingual website, together with s2Member. After reading a lot of different forums posts about how to get registration forms and information to be multilingual, we finally managed to use Pro Forms and use different levels for different languages – this page was helpful http://www.s2member.com/forums/topic/how-to-multilingual-registration-form/.

That works great for the registration form, but unfortunately it doesn’t work for the profile page, when using the [s2Member-Profile /] shortcode. With the shortcode, all labels and fields are in English even on non-English pages.

If I add a Pro Form registration form on the profile page, eg:

[s2Member-Pro-PayPal-Form register="1" level="2" ccaps="" desc="" success="our-thank-you-page" custom="our-url" tp="0" tt="D" captcha="clean" update="1" /]

then all fields, including the custom profile fields, are shown in non-English languages.

So my question is whether the profile shortcode is rendering differently than the pro form, even when displaying the same field (such as a custom profile field)?

Is there any way of using a pro form to edit a profile, or use some other way of getting the profile forms to show in the correct language?

Would be happy to PM URL / login directly if needed.

Thanks!

List Of Topic Replies

Viewing 7 replies - 1 through 7 (of 7 total)
Author Replies
Author Replies
Posted: Thursday Aug 30th, 2012 at 7:18 am #23551

Hi Sam.

this page was helpful http://www.s2member.com/forums/topic/how-to-multilingual-registration-form/.

That works great for the registration form, but unfortunately it doesn’t work for the profile page

You mean the applicable level setting for the profile fields, is not being followed in the profile form?

Could you show screenshots of what you have in the pro-form and the profile form? Thanks!

Posted: Wednesday Sep 5th, 2012 at 6:02 am #24143
Sam Lee
Username: innocsrlee

Sorry, I missed the reply – thanks for your input!

This is what the registration page looks like for Chinese users: http://dl.dropbox.com/u/27590792/register.jpg

It doesn’t seem possible to edit the “Additional information”, “Security code” and some other texts, but at least all the input fields/labels are translated.

On the profile page, it currently looks like this for Chinese users: http://dl.dropbox.com/u/27590792/profile.jpg

I’ve added two forms here. At the top, it’s using:

[s2Member-Profile /]

which is what I’d like to use, but it’s showing everything in English.

At the bottom, I’ve just pasted in:

[s2Member-Pro-PayPal-Form register="1" level="2" ccaps="" desc="" success="http://oursite.com" custom="oursite.com" tp="0" tt="D" captcha="clean" update="1" /]

to test what it’s rendering. And here it’s showing the form similar to the registration page (makes sense, since it’s using the same pro form).

So for some reason, any translated fields/labels that the pro forms can handle, doesn’t seem to be translated by the s2Member-Profile function.

Hope that explains things a bit better.

Posted: Wednesday Sep 5th, 2012 at 11:49 am #24170
Sam Lee
Username: innocsrlee

I should perhaps add that the above is for Pro Forms, when users sign up for free. Level 1 is used for English, and level 2 for Chinese users. On the whole it works fine, apart from the above issues.

In the near future, we’ll require paid membership however, and will use both PayPal and AliPay. Since AliPay is buy-now-button only, we’ll set things up to use buy-now-buttons for PayPal as well.

This throws up a couple of other translation issues – some of these might be due to WPML, we’re investigating these.

But I’m also trying to translate the return-pages when coming back to the site (those grey s2Member pages) and finding that I can’t translate many of them. Looking in the plugin code, I’m seeing a lot of:

_x ("Continue", "s2member-front", "s2member");

I don’t know gettext all that well, but wondering if these aren’t wrong? Will it still work with a space between _x and ( ? Shouldn’t it be:

_x("Continue", "s2member-front", "s2member");

If I can’t translate these return pages, I might bypass them altogether with the success shortcode. What I’m not sure about though, is how it works with registration access links that are sent out by email – do these point to the s2Member return pages, or to the success-URL? If bypassing the return pages, I’d like to send people straight from PayPal/AliPay to the account creation pages (that are otherwise disabled), but I don’t know if that works for the email links as well..

Posted: Thursday Sep 6th, 2012 at 7:25 am #24288

So you want to have the pro-form show in different languages depending on what you’re selling? I’m afraid I don’t have an answer for that, s2Member was not designed to be multilingual. :/

What I’m not sure about though, is how it works with registration access links that are sent out by email – do these point to the s2Member return pages, or to the success-URL?

The success URL in the pro-form is where the user will be redirected to after completing payment/registration successfully.

The link sent in the confirmation email is to be allowed to register and give the new account the proper level/access. This is important when using the buttons to sell, because with the pro-forms the user registers right then.

I hope that helps. :)

Posted: Thursday Sep 6th, 2012 at 9:22 am #24313
Sam Lee
Username: innocsrlee

Thanks for your reply Cristián!

The penny finally dropped in terms of my problem with the profile pages and why they wouldn’t translate (the way the pro forms do). Since I had set up a different level for each language group (to be able to have custom fields in different languages), when showing the profile page, it would show all those custom fields relative to the user’s level. So if a user used the English form to sign up (level 1), they would see their custom fields in English, regardless of whether they viewed the profile page in English or Chinese.

That makes sense. What I did was to check which level a user belongs to when they get to the profile page, then redirect them to the profile page in their level’s language. Now any level 1 (English) users who try to access the Chinese profile page, simply get redirected to the English profile page.

<?php
// If user is LEVEL 1 (EN) and visit CN profile (1063), redirect to EN profile (1061)
if ( current_user_is("s2member_level1") && is_page(1063) ) {
	header( 'Location: ' . get_permalink(1061) );
// If user is LEVEL 2 (CN) and visit EN profile (1061), redirect to CN profile (1063)
} elseif ( current_user_is("s2member_level2") && is_page(1061) ) {
	header( 'Location: ' . get_permalink(1063) );
} ?>

Not an ideal setup really in terms of multiple languages, but this solves the issue of custom fields and profile pages.

Posted: Thursday Sep 6th, 2012 at 9:30 am #24315
Sam Lee
Username: innocsrlee

In terms of the other issue, of where the confirmation email links point to, that’ll be relevant to us later, as we’ll use buttons instead of pro forms (since we need to use AliPay as well).

If it’s not possible to send customers slightly different URLs (with a language variable) in the confirmation email, then we’ll have to work around it by setting up custom payment gateway return pages.

The interest in having s2Member fully and conveniently multilingual (compatible with WPML, qTranslate etc) is probably not something a lot of people would use, but it’d be a great addition to your excellent plugin!

Posted: Friday Sep 7th, 2012 at 4:51 am #24478

Thanks for the update, Sam! I’m glad you found the problem.

True, a good multilingual solution would be ideal but, like you said, there isn’t much demand for it, at least not compared to other more requested/needed features. WordPress itself is very lacking in this department.

My solution to a multilingual site using WordPress in the past, has been to have two separate installations, one for each language, and that gave me full control, without the problems that trying to hack it into WP and every plugin meant.

Viewing 7 replies - 1 through 7 (of 7 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.