PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Italian Localization

s2Member Plugin. A Membership plugin for WordPress®.

Italian Localization

Postby nemoprincess » October 5th, 2011, 9:08 pm

Hello there, I have compiled the pot file with Poedit, translated the front-end and saved to have my mo file. I have put it in this directory:

s2member/includes/translations

and tried to call it as

s2member-[locale].mo
s2member-[it].mo
s2member-IT.mo

but it doesn' t take the translation.

Should I have done anything else? Thanks
User avatar
nemoprincess
Registered User
Registered User
 
Posts: 24
Joined: October 5, 2011
Location: London, UK

Re: Italian Localization

Postby camillemm » October 6th, 2011, 3:02 am

I thought there should be something like this

Code: Select all
load_plugin_textdomain('s2member', 'wp-content/plugins/s2member');

in the s2member.php file but I cannot find it.

By the way, is there any french translation finished ?
User avatar
camillemm
Registered User
Registered User
 
Posts: 86
Joined: September 7, 2010

Re: Italian Localization

Postby nemoprincess » October 6th, 2011, 5:03 am

Thanks camillemm, but I cannot find it anywhere.
User avatar
nemoprincess
Registered User
Registered User
 
Posts: 24
Joined: October 5, 2011
Location: London, UK

Re: Italian Localization

Postby camillemm » October 6th, 2011, 5:06 am

I think it's needed for showing the translations. It may be the problem.
User avatar
camillemm
Registered User
Registered User
 
Posts: 86
Joined: September 7, 2010

Re: Italian Localization

Postby Jason Caldwell » October 11th, 2011, 5:53 pm

Hi there. Thanks for reporting this important issue.

s2Member does load it's textdomain inside:
/s2member/includes/classes/translations.inc.php
Code: Select all
public static function load ()
    {
        load_plugin_textdomain ("s2member", false, c_ws_plugin__s2member_utils_dirs::rel_path (WP_PLUGIN_DIR, dirname (dirname (__FILE__)) . "/translations/"));
        /**/
        do_action ("ws_plugin__s2member_during_translations_load", get_defined_vars ());
        /**/
        add_filter ("gettext", "c_ws_plugin__s2member_translations::translation_mangler", 10, 3);
    /**/
    } 
Did you set the WP_LANG constant in your /wp-config.php file?
See: http://codex.wordpress.org/Installing_W ... r_Language
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Italian Localization

Postby nemoprincess » October 12th, 2011, 5:16 am

Hi there, the language is set in wp-config.php. But nothing changes. What should I do with this code from translations.inc.php?
Thanks
User avatar
nemoprincess
Registered User
Registered User
 
Posts: 24
Joined: October 5, 2011
Location: London, UK

Re: Italian Localization

Postby Jason Caldwell » October 12th, 2011, 12:07 pm

Thanks for the follow-up.

You don't need to do anything with that code, I just posted it to clarify what s2Member does already. Can you please ZIP your MO file and attach it in a reply for me? I'll review this for you and provide a solution.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Italian Localization

Postby nemoprincess » October 12th, 2011, 5:15 pm

Hi Jason thanks to you, as attachement you can have my .mo file. I did it with Poedit Editor.

Thanks again.
Attachments
s2member-[it].zip
(904 Bytes) Downloaded 101 times
User avatar
nemoprincess
Registered User
Registered User
 
Posts: 24
Joined: October 5, 2011
Location: London, UK

Re: Italian Localization

Postby Jason Caldwell » October 12th, 2011, 6:36 pm

Thank you. While I'm looking at this, what version of s2Member/WordPress are you running please? And, are you on a Windows server, or what is your hosting platform?
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Italian Localization

Postby Jason Caldwell » October 12th, 2011, 8:25 pm

Thank you. I got your MO file loaded up on my side OK.

Here are some things I would try.

1. Rename s2member-[it].mo to s2member-it.mo ( brackets are invalid ).
( this should fix the issue that you're having )

2. Or, if that does NOT work, move your s2member-it.mo file into your plugins directory.
/wp-content/plugins/s2member-it.mo

Then create this file also.
/wp-content/mu-plugins/s2-hacks.php
Code: Select all
<?php
add_action 
("plugins_loaded", "load_s2_textdomain"); function load_s2_textdomain ()
    {
        load_plugin_textdomain("s2member");
        /* Allows `.mo` file to be loaded from:
        `/wp-content/plugins/s2member-[locale].mo`. */
    }
?>
* Be sure NOT to have any spaces/tabs/line breaks before or after <?php ?>.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Italian Localization

Postby nemoprincess » October 13th, 2011, 6:37 am

Hi Jason, thanks for you reply, but I' m sorry to tell you that neither the first solution nor the second one is working.
I tried already the first one. Any other suggestion will be much appreciated. Thanks a lot.
User avatar
nemoprincess
Registered User
Registered User
 
Posts: 24
Joined: October 5, 2011
Location: London, UK

Re: Italian Localization

Postby Jason Caldwell » October 13th, 2011, 1:11 pm

Thanks for the follow-up.

And you have define("WP_LANG", "it"); correct?
Does WordPress load any other translation files, or is this problem s2Member-specific?
In what way are you testing this to see if it's working? I noticed that your MO file only provides translation for a few of s2Member's front-end features. For instance, you've translated s2Member's Profile Editing panel. That loads up fine on my end, so I'm stumped right now, so sorry.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Italian Localization

Postby nemoprincess » October 13th, 2011, 3:37 pm

Hi Jason, I have defint("etc...."). I have some plugins that seems to be traslated in the right way. For now I just need to traslate a few sentences, that' s right. I haven' t translated anything else than what I need. The traslation regards the form to login and to register that I have in a wordpress page, the sentences that appear there are the sentences that I translated and this is the way that I test it and it' s not working. I can try to translate something else maybe.
User avatar
nemoprincess
Registered User
Registered User
 
Posts: 24
Joined: October 5, 2011
Location: London, UK

Re: Italian Localization

Postby nemoprincess » November 28th, 2011, 8:18 am

I need to update this post, I have found something that seems a bit weird.
I could figure out how to make my translation work. The point is that in the last Wordpress release (3.2.1) in the wp-config.php we have something like this to define the Italian language:

define('WPLANG', 'it_IT');

Now I am pretty sure that S2Members doesn' t recognize this part: 'it_IT'
If I have something like:

define('WPLANG', 'it');

it will work, but my Wordpress localization in this case is not working anymore.

If I have both of them, it will take for good just the first one.
User avatar
nemoprincess
Registered User
Registered User
 
Posts: 24
Joined: October 5, 2011
Location: London, UK

Re: Italian Localization

Postby nemoprincess » November 28th, 2011, 9:15 am

In the end, the right way to call the file in the translations folder is this one:

s2member-it_IT.mo

and localization will work for boths, S2Members and Wordpress.
User avatar
nemoprincess
Registered User
Registered User
 
Posts: 24
Joined: October 5, 2011
Location: London, UK

Re: Italian Localization

Postby Cristián Lávaque » November 29th, 2011, 1:46 am

Thanks for the update! :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Italian Localization

Postby newmediologo » December 19th, 2011, 5:56 am

HI All..

I'd try to translate the s2member.pot to obtain the Italian localization but Id does not work, now I've follow the nemoprincess directions uploading the file s2member-it_IT.mo in the translation folder and it seem to works..

Ho I can perform a COMPLETE Italian Localization for s2Member..?

If this task is possible I can translate s2Member in Italian and share the result with the community..

Thanks all.
User avatar
newmediologo
Registered User
Registered User
 
Posts: 5
Joined: December 17, 2011

Re: Italian Localization

Postby Cristián Lávaque » December 19th, 2011, 6:29 pm

What parts are missing translation that can't be done from that file?
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Italian Localization

Postby newmediologo » December 26th, 2011, 5:48 am

Cristián Lávaque wrote:What parts are missing translation that can't be done from that file?


HI.. Just take time to translate ALL the file including thew back-end and the Pro Version messages.. But I'm not able to use Poedit because it generates error when I save the file, I just can provide the s2member.pot in italian..

Have nice time..
User avatar
newmediologo
Registered User
Registered User
 
Posts: 5
Joined: December 17, 2011

Re: Italian Localization

Postby newmediologo » December 28th, 2011, 9:47 am

_s2member.pot.zip
(27.94 KiB) Downloaded 99 times
Here is the complete Italian Translation for s2 Member including Admin area and Pro Version.. I'm not able to use Poedit, so is it possible some errors.. If anyone can check it and generate the .mo file it is usable..
User avatar
newmediologo
Registered User
Registered User
 
Posts: 5
Joined: December 17, 2011

Re: Italian Localization

Postby Cristián Lávaque » December 29th, 2011, 4:51 am

Thank you, newmediologo! :)

nemoprincess, could you check it?
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron