Page 1 of 1

Translate the default field names on the registration form

PostPosted: September 30th, 2010, 8:08 pm
by fredericd
I purchased s2member a month ago and I need to translate the default field names in french on the registration form. ( ie. Email Address , password, company etc..) I've tried to do this on the the administration panel but without success.

Which file I have to edit to do that?

Many thanks

Frederic

Re: Translate the default field names on the registration fo

PostPosted: October 2nd, 2010, 10:43 am
by Elizabeth
Hi,

With the latest version of s2Member, s2Member v3.2.7 ( new Custom Fields ), it will be easier for you.
* Custom Fields ( new features ). s2Member is now equipped with a VERY powerful set of features; designed to extend the functionality of Custom Fields. s2Member now supports Text Fields ( single/multi-line ), Checkboxes ( single/multi-option ), Radio Buttons ( single/multi-option ), and Dropdowns ( single/multi-option ).

Re: Translate the default field names on the registration fo

PostPosted: November 15th, 2010, 5:54 pm
by alargeau
Hello,

Elizabeth, you're totally right, custom fields can be in any language but I think the question was about the default fields which are in English and which cannot be modified. As a matter of fact, I'd like to know the answer too.

Re: Translate the default field names on the registration fo

PostPosted: November 15th, 2010, 6:10 pm
by crushthenet
Those are in the file "includes/functions/translations.inc.php"

Look around line 79, looks like this...

Code: Select all
"Username *"


Code: Select all
"Email Address *"


The others look like they're in this file... "includes/functions/custom-reg-fields.inc.php"

Not sure if there's an easier way, but this is what I'd do if I had to change them.

Re: Translate the default field names on the registration fo

PostPosted: November 16th, 2010, 4:03 am
by alargeau
Thanks! Awesome!

And if you want to translate the default fields on the user profile page, just modify "includes/profile.inc.php". You can also change the "Save changes" button there and translate some other stuff.

Re: Translate the default field names on the registration fo

PostPosted: November 17th, 2010, 6:29 am
by x3000gold
Hi,

I am also trying translating. I use this form /wp-login.php?action=register and allows members to create their own passwords during registration.

Need to translate First name, Last name and password. Cant find the correct file to change!

Thanks,

Re: Translate the default field names on the registration fo

PostPosted: November 17th, 2010, 10:00 am
by crushthenet
The others look like they're in this file... "includes/functions/custom-reg-fields.inc.php"

Down around line 320........... they look like this..........

Code: Select all
echo '<span>Password *</span><br />' . "\n";

Re: Translate the default field names on the registration fo

PostPosted: November 17th, 2010, 10:17 am
by x3000gold
Thanks! Now I found them!

The input text for my custom filed select menu is 18px. Little to big. This is the code from FireBug:

div#login form select.ws-plugin--s2member-custom-reg-field > option {
font-size:18px !important;
}

I looked in the css file but did not find this. Is there any chance you know this?

Re: Translate the default field names on the registration fo

PostPosted: November 17th, 2010, 10:26 am
by crushthenet
That should be right in the admin area, General Options -> Login/Registration Design

Re: Translate the default field names on the registration fo

PostPosted: December 29th, 2010, 3:25 am
by x3000gold
I want to translate the pop-up window when something is missing or is wrong when register. Like:

Oops, you missed something:

User
This is a required field, please try again.

Email
This is a required field, please try again.

Password*
This is a required field, please try again.

Re: Translate the default field names on the registration fo

PostPosted: January 28th, 2011, 6:56 pm
by Cristián Lávaque
I was wondering: if I translate the strings in those files, will they be overwritten the next time I update S2Member? If so, how can I make these changes in such a way that they won't be lost?

Re: Translate the default field names on the registration fo

PostPosted: February 27th, 2011, 7:23 am
by cyror
At this point in time the intricate stuff is when you want to manage several languages at the meantime ... like with a plugin as qTranslate (for instance).

It is feasible to tune profile.inc.php or custom-reg-fields.inc.php for inline translation but for issues like javascript errors when a field is empty or custom field it is not possible ... for instance qTranslate deals with tags
Code: Select all
<!--:en-->word<!--:--><!--:fr-->mot<!--:-->
and when you create the description of your custom field then a pragma is applied which delete <!--> caracters... maybe it is possible to tweak this directly within the mysql table... does anybody already seek the sql field of custom field ?

Re: Translate the default field names on the registration fo

PostPosted: March 18th, 2011, 8:03 am
by kentlii
The advice given here, have messed up the installation in my s2member. Had to substitute the files where changes where made, because it totally fu the pages. Just so others are aware.

Re: Translate the default field names on the registration fo

PostPosted: April 4th, 2011, 12:53 pm
by ciccio8
crushthenet wrote:The others look like they're in this file... "includes/functions/custom-reg-fields.inc.php"

Down around line 320........... they look like this..........

Code: Select all
echo '<span>Password *</span><br />' . "\n";



hello im searching for the same file but i can find it, can you please write the full path ?

tnks in advance

Re: Translate the default field names on the registration fo

PostPosted: April 4th, 2011, 4:22 pm
by Cristián Lávaque
Try the classes directory in stead of the functions one.

s2member/includes/classes/custom-reg-fields.inc.php

Re: Translate the default field names on the registration fo

PostPosted: September 20th, 2011, 6:08 pm
by Cristián Lávaque
s2Member now supports translations! :)

* (s2Member/s2Member Pro) Translation Support. s2Member and s2Member Pro are now equipped with support for front-end translation, using standardized WordPress® methodologies; i.e. we've implemented the use of _x(), and various other translation routines for many aspects of s2Member's front-end interfaces. For instance, things like Profile panels, Login/Registration Fields, and Pro Form integrations; as well as error messages displayed to Users/Members. Translation support for back-end admin panels provided by s2Member will come in a future release, along with more extensive translation support for front-end aspects.

Please note, this is but our first step toward internationalizing s2Member and s2Member Pro. Look for further updates/improvements to come in the future.

Like WordPress® itself, we chose to use the GNU gettext localization framework to provide localization infrastructure for s2Member®. GNU gettext is a mature, widely used framework for modular translation of software, and is the de facto standard for localization in the open source/free software realm. If you'd like to translate s2Member and/or s2Member Pro, please use the POT file found inside /s2member/includes/translations/s2member.pot, which contains all translation entries for both the s2Member Framework ( i.e. the free version ), and also for s2Member Pro.

The file: /s2member/includes/translations/s2member.pot will be updated with each new release of s2Member. If this is your first translation of a WordPress® plugin, this article and/or this article, might be of some assistance. When you are finished translating the s2member.pot file, place your completed s2member-[locale].mo file into this directory: /s2member/includes/translations/; and please feel free to share your translation with the rest of the s2Member® community.

Quick Tip: If you only need to translate the front-end of s2Member, please ignore entries in the s2member.pot file with a context matching s2member-admin. Those sections of s2Member are only seen by site Administrators; they are NOT used in s2Member's front-end integration with WordPress®. Skipping over translation entries with a context matching s2member-admin can save you time.

Re: Translate the default field names on the registration fo

PostPosted: October 5th, 2011, 9:25 pm
by lambo12
I tried to translate default field name into chinese (eg username, password), using poedit to modify the s2member.pot and save it as a s2member.po file. I uploaded the .po and .mo to translation folders, but it didnt work. Are there any steps i miss out?

Re: Translate the default field names on the registration fo

PostPosted: October 6th, 2011, 4:26 am
by Cristián Lávaque
Are you using the Chinese version of WordPress? That should have the default name field translated.

Re: Translate the default field names on the registration fo

PostPosted: October 6th, 2011, 9:33 pm
by lambo12
I found what the problem was. I saved .po file using the file name, s2member-[zh_TW].po, which was not recognized by the s2member plugin. After I changed file name to s2member-zh_TW.po, the translation works !! Thanks for your reply, Cristian.

Re: Translate the default field names on the registration fo

PostPosted: October 7th, 2011, 3:09 am
by Cristián Lávaque
You're welcome! I'm very glad it's working for you. :)

If you'd like to share your translation, you can attach it to your reply here.