Translation with .mo not working anymore

I created a new website with s2member and the old system for translating s2member with a .mo file isn’t working anymore. My website is still in English if I place my file in /wp-content/plugins/ as suggested on the forum, while my website crashes if I place the .mo file in //wp-content/languages/plugins/

Any suggestion?
Thanks in advance

I found that s2Member’s translation loading could be more explicit and more compatible with current WordPress behavior, so I’ve patched that.

s2member-v260320.0101.zip (1.4 MB)

It may improve reliability for custom .mo files placed in either of these locations:

  • modern standard wp-content/languages/plugins/s2member-LOCALE.mo
  • legacy fallback wp-content/plugins/s2member-LOCALE.mo

That said, if a specific .mo file still fails after this change, the next likely cause is the file itself or a site-specific conflict, rather than the load path.

:slight_smile:

Hello Cristian
thank you very much for your help. I updated s2member but the translation is not working yet. I created a new .mo file starting from scratch, but still nothing.
It’s wierd because my website is new, with a simple theme and almost no plugins.

Can anyone in the forums send me a working .mo file in any language, so that I can test it? Or maybe you have a .mo file yourself, Cristian?

Thanks again
best regards

Thanks for trying it.

Make sure the site language in WordPress > Settings > General exactly matches the locale used in the filename; for example, if the site language is it_IT , the file must be named exactly s2member-it_IT.mo

Does your .mo file include translation for the parts you’re expecting to be translated?

Here are translations contributed in the plugins directory, and as you can see they can be incomplete, so it’s possible that the mo file loaded but you’re looking at a part that isn’t translated. https://translate.wordpress.org/projects/wp-plugins/s2member/

Could you show me the .mo file? Not sure if you can attach it here, or in a private message, otherwise you can upload it to your site and give me the url to it.

:slight_smile:

Hello Cristian, thanks again for your help. Here is my .mo file.

https://www.dropbox.com/scl/fi/q86d92ujzr5dtvvdon4ho/s2member_it_IT.mo?rlkey=cftsvknwoe2q0ra8rv93dflq8&dl=0

In wordpress/settings/general I can only choose between English and Italian, I can’t see if Italian is coded exactly as it_IT, but I guess this is the standard.

I am willing to translate stripe proforms, above all, and all the entries “Your profile”, “Billing method” etc. have been translated in the .po / .mo files.

Best regards
Leo

Thanks, Leo.

I tried to review the file, but seems empty…

I worked on a translation to Italian with some help, and I’m not sure it’s very good, but maybe it’s a good enough starting point to improve from.

Here you go: s2member-it_IT.zip (69.4 KB)

Please let me know if it worked for you, and if it’s decent enough.

:slight_smile:

Hello Cristian, thank you very much. I don’t know what happened with the upload, anyway my file was the problem, because your .mo file worked immediately, instead.

Thanks for your support, I didn’t expect you to work on this so much, and less during the weekend!

The translation itself seems good, so far. If something needs to be corrected I will do it myself, and will share the file.

Thanks again, Cristian. I will definitely write a review on wordpress.org to let other people know s2member is still being supported so well.

Best regards
Leo

1 Like

Thank you for the update. I’m so glad it worked well for you! :grinning:

I look forward to your update on the translation. I’m really curious to know how well it turned out, and any improvements you find needed.

And thank you for the nice words! A review will be very welcome and appreciated, too. :hugs: