Page 1 of 1
Italian Localization

Posted:
October 5th, 2011, 9:08 pm
by nemoprincess
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
Re: Italian Localization

Posted:
October 6th, 2011, 3:02 am
by camillemm
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 ?
Re: Italian Localization

Posted:
October 6th, 2011, 5:03 am
by nemoprincess
Thanks camillemm, but I cannot find it anywhere.
Re: Italian Localization

Posted:
October 6th, 2011, 5:06 am
by camillemm
I think it's needed for showing the translations. It may be the problem.
Re: Italian Localization

Posted:
October 11th, 2011, 5:53 pm
by Jason Caldwell
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
Re: Italian Localization

Posted:
October 12th, 2011, 5:16 am
by nemoprincess
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
Re: Italian Localization

Posted:
October 12th, 2011, 12:07 pm
by Jason Caldwell
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.
Re: Italian Localization

Posted:
October 12th, 2011, 5:15 pm
by nemoprincess
Hi Jason thanks to you, as attachement you can have my .mo file. I did it with Poedit Editor.
Thanks again.
Re: Italian Localization

Posted:
October 12th, 2011, 6:36 pm
by Jason Caldwell
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?
Re: Italian Localization

Posted:
October 12th, 2011, 8:25 pm
by Jason Caldwell
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");
}
?>
* Be sure NOT to have any spaces/tabs/line breaks before or after <?php ?>.
Re: Italian Localization

Posted:
October 13th, 2011, 6:37 am
by nemoprincess
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.
Re: Italian Localization

Posted:
October 13th, 2011, 1:11 pm
by Jason Caldwell
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.
Re: Italian Localization

Posted:
October 13th, 2011, 3:37 pm
by nemoprincess
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.
Re: Italian Localization

Posted:
November 28th, 2011, 8:18 am
by nemoprincess
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.
Re: Italian Localization

Posted:
November 28th, 2011, 9:15 am
by nemoprincess
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.
Re: Italian Localization

Posted:
November 29th, 2011, 1:46 am
by Cristián Lávaque
Thanks for the update!

Re: Italian Localization

Posted:
December 19th, 2011, 5:56 am
by newmediologo
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.
Re: Italian Localization

Posted:
December 19th, 2011, 6:29 pm
by Cristián Lávaque
What parts are missing translation that can't be done from that file?
Re: Italian Localization

Posted:
December 26th, 2011, 5:48 am
by newmediologo
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..
Re: Italian Localization

Posted:
December 28th, 2011, 9:47 am
by newmediologo
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..
Re: Italian Localization

Posted:
December 29th, 2011, 4:51 am
by Cristián Lávaque
Thank you, newmediologo!

nemoprincess, could you check it?