WP Sharks Community Forums - Latest posts https://forums.wpsharks.com Latest posts Translation with .mo not working anymore 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

]]>
https://forums.wpsharks.com/t/translation-with-mo-not-working-anymore/13375/5 Fri, 20 Mar 2026 13:45:15 +0000 forums.wpsharks.com-post-37681
Translation with .mo not working anymore 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:

]]>
https://forums.wpsharks.com/t/translation-with-mo-not-working-anymore/13375/4 Fri, 20 Mar 2026 12:52:45 +0000 forums.wpsharks.com-post-37680
Translation with .mo not working anymore 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

]]>
https://forums.wpsharks.com/t/translation-with-mo-not-working-anymore/13375/3 Fri, 20 Mar 2026 08:25:08 +0000 forums.wpsharks.com-post-37679
Translation with .mo not working anymore 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:

]]>
https://forums.wpsharks.com/t/translation-with-mo-not-working-anymore/13375/2 Thu, 19 Mar 2026 22:57:21 +0000 forums.wpsharks.com-post-37676
How to apply translation to S2m 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:

]]>
https://forums.wpsharks.com/t/how-to-apply-translation-to-s2m/12388/6 Thu, 19 Mar 2026 22:56:41 +0000 forums.wpsharks.com-post-37675
All headers have no-cache and cache-control: max-age=0 I hope it helps! I look forward to your update. :slight_smile:

]]>
https://forums.wpsharks.com/t/all-headers-have-no-cache-and-cache-control-max-age-0/5375/10 Thu, 19 Mar 2026 21:56:49 +0000 forums.wpsharks.com-post-37674
How to apply translation to S2m Hello, did you find a solution in the end? I have the same issue with my website. Thanks in advance.

]]>
https://forums.wpsharks.com/t/how-to-apply-translation-to-s2m/12388/5 Thu, 19 Mar 2026 20:25:58 +0000 forums.wpsharks.com-post-37673
All headers have no-cache and cache-control: max-age=0 Thanks so much @openmtbmap and @clavaque - I really appreciate it!

I’m going to send this information to my developer today. I’ll report back with results.

]]>
https://forums.wpsharks.com/t/all-headers-have-no-cache-and-cache-control-max-age-0/5375/9 Thu, 19 Mar 2026 13:01:41 +0000 forums.wpsharks.com-post-37669
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

]]>
https://forums.wpsharks.com/t/translation-with-mo-not-working-anymore/13375/1 Thu, 19 Mar 2026 11:02:43 +0000 forums.wpsharks.com-post-37668
Are patches to S2member being accepted? / UK Postcode Thank you! :slight_smile:

]]>
https://forums.wpsharks.com/t/are-patches-to-s2member-being-accepted-uk-postcode/12200/9 Wed, 18 Mar 2026 17:44:56 +0000 forums.wpsharks.com-post-37665
Are patches to S2member being accepted? / UK Postcode Looks good :sweat_smile::+1:

I’ve just DM you some notes, compiled from my previous responses here.

]]>
https://forums.wpsharks.com/t/are-patches-to-s2member-being-accepted-uk-postcode/12200/8 Wed, 18 Mar 2026 09:51:05 +0000 forums.wpsharks.com-post-37664
Are patches to S2member being accepted? / UK Postcode Please try this one:

s2member-v260318.0404.zip (1.4 MB)

:slight_smile:

]]>
https://forums.wpsharks.com/t/are-patches-to-s2member-being-accepted-uk-postcode/12200/7 Wed, 18 Mar 2026 01:49:46 +0000 forums.wpsharks.com-post-37662
Are patches to S2member being accepted? / UK Postcode
Gerard:

PS) I’d very much appreciate a credit on the changelog :+1: Thanx :sweat_smile:

Of course! I had already written it in the draft. It is very appreciated and welcome. :pray:

In the text I included I mention …

Got it on the format notes. I’ll review this and probably make some adjustments before the release. I’ll post an update here once I have it.

:slight_smile:

]]>
https://forums.wpsharks.com/t/are-patches-to-s2member-being-accepted-uk-postcode/12200/6 Tue, 17 Mar 2026 18:30:09 +0000 forums.wpsharks.com-post-37659
Are patches to S2member being accepted? / UK Postcode In the text I included I mention

'Must be a UK Postcode (7-8 digits w/possible space).'

which almost all postcodes adhere to. Your edit

'Must be a UK postcode (5-8 characters w/ possible space).'

is fine but its no more correct than the initial 7-8 text, as if one is being 100% precise about it, submitted RegEx strings which are 4-9 characters long would be accepted.

In the official UK government Office of National Statistics website, all of the current official postcodes are between 5-7 characters long if all the spaces are removed before testing.

SELECT MIN(LENGTH(REPLACE(Postcode, ' ', ''))) AS min_length, MAX(LENGTH(REPLACE(Postcode, ' ', ''))) AS max_length FROM postcode;

min_length 5
max_length 7

The current postcode data is available to download for free.

So the RegEx I’ve implemented is:

/^(([a-zA-Z]{1,2}[0-9][a-zA-Z0-9]?|ASCN|STHL|TDCU|BBND|[BFS]IQQ|PCRN|TKCA) ?[0-9][a-zA-Z]{2}|BFPO ?[0-9]{1,4}|(KY[0-9]|MSR|VG|AI)[ -]?[0-9]{4}|[a-zA-Z]{2} ?[0-9]{2}|GE ?CX|GIR ?0A{2}|SAN ?TA1)$/

As this takes into account historic Postcodes which people might use even thought they’re not valid postcodes any more, so I think this is a better choice as its more forgiving and will generate less support queries :sweat_smile: It accepts postcodes of the British Islands and Overseas Territories + Military + exceptions such as:

* ASCN 1ZZ     (Ascension Island)
* STHL 1ZZ     (St Helena)
* TDCU 1ZZ     (Tristan da Cunha)
* BIQQ 1ZZ     (British Indian Ocean Territory)
* BFPO 123 / BFPO 9999
* SAN TA1      (Santa – special historical case)🎅🎄
* AI 2640      (Anguilla)
* VG 1110      (British Virgin Islands)
* MSR 1110     (Montserrat)
* KY3 1ZZ      (Cayman Islands)
* GE CX        (very rare exception)
* GIR 0AA      (Historical UK Government benefits payment bank, Girobank)
* GY# #AA      (Guernsey / Alderney style)

This is the main reason I suggest providing users a client side function to help format user input, as it will be very very very easy for people to input what they think is a valid postcode which doesn’t pass the RegEx, which I could imagine being very frustrating for people. I’d be happy to compile some simple examples for documentation on the s2member website if you think that would help.

The following is the “official” UK Government regular expression

^([Gg][Ii][Rr] 0[Aa]{2})|((([A-Za-z][0-9]{1,2})|(([A-Za-z][A-Ha-hJ-Yj-y][0-9]{1,2})|(([A-Za-z][0-9][A-Za-z])|([A-Za-z][A-Ha-hJ-Yj-y][0-9]?[A-Za-z])))) [0-9][A-Za-z]{2})$

Which can be found here:

https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/488478/Bulk_Data_Transfer_-_additional_validation_valid_from_12_November_2015.pdf

But even UK government websites used a variety of RegExs :scream:

I had considered implementing this with a menu page option to allow people to insert their own chosen RegEx, which would default to the above RegEx if none is submitted, but I’d thought that might perhaps be a bit to ambitious for my first contribution :sweat_smile:

Also, thanks for checking this so quickly :robot:

And yes, UK Postcodes are a nightmare :sweat_smile:

PS) I’d very much appreciate a credit on the changelog :+1: Thanx :sweat_smile:

]]>
https://forums.wpsharks.com/t/are-patches-to-s2member-being-accepted-uk-postcode/12200/5 Tue, 17 Mar 2026 07:49:13 +0000 forums.wpsharks.com-post-37658
Are patches to S2member being accepted? / UK Postcode Here you go.

s2member-v260317.0418.zip (1.4 MB)

I reviewed it and made a few adjustments so it fits cleanly with the existing custom field handling. The UK postcode support is now wired through the same areas as the existing zipcode formats:

  • server-side validation
  • admin-side expected-value selection
  • front-end validation
  • matching minified JS for the release package

I didn’t keep the separate postcode-formatting helper as submitted, but the validation-side support is in place and the package now looks consistent for testing.

Please take a look when you have a moment and let me know if you spot anything I should fix before release.

:slight_smile:

]]>
https://forums.wpsharks.com/t/are-patches-to-s2member-being-accepted-uk-postcode/12200/4 Tue, 17 Mar 2026 02:04:58 +0000 forums.wpsharks.com-post-37657
Are patches to S2member being accepted? / UK Postcode Thanks, Gerard! Sure, it’s welcome.

I’ll review it to see if it needs any tweaks or if it makes sense in the release.

:slight_smile:

]]>
https://forums.wpsharks.com/t/are-patches-to-s2member-being-accepted-uk-postcode/12200/3 Mon, 16 Mar 2026 15:58:48 +0000 forums.wpsharks.com-post-37654
Are patches to S2member being accepted? / UK Postcode Hi @clavaque
I DM’d you my little effort to get UK postcodes up and running in s2member. Do let me know know what you think.

Gerard

]]>
https://forums.wpsharks.com/t/are-patches-to-s2member-being-accepted-uk-postcode/12200/2 Mon, 16 Mar 2026 14:51:48 +0000 forums.wpsharks.com-post-37653
All headers have no-cache and cache-control: max-age=0
s2Member®

:slight_smile:

]]>
https://forums.wpsharks.com/t/all-headers-have-no-cache-and-cache-control-max-age-0/5375/8 Thu, 12 Mar 2026 03:36:36 +0000 forums.wpsharks.com-post-37642