latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

translation of parantheses

Home Forums Community Forum translation of parantheses

This topic contains 3 replies, has 3 voices. Last updated by  Cristián Lávaque 3 years, 10 months ago.

Topic Author Topic
Posted: Tuesday Mar 5th, 2013 at 11:08 am #43790
Ganaxi
Username: ganaxi

Hi,

I am using the link below to make changes to the registration form fields
http://www.s2member.com/kb/changing-words-phrase/

but am running into problems when trying to change the field that says,
Username(lowercase letters and/or numbers)*

I believe it has to do with the way parantheses, and * and / are interpreted.

The muplugin referred to in the above link works for all other fields, except this one (it is just too long and flows on the next line, so I am trying to shorten it).

For example, I tried the code below, as directed in the above link, and also tried replacing the (, * and / by their ASCII equivalents, but nothing works. The field name remains unchanged. Please help.

Manish

< ?php
add_filter('gettext_with_context', 's2_translator', 10, 4);
function s2_translator($translated, $original, $context, $text_domain)
	{
		if($context === 's2member-front' && $text_domain=== 's2member')
			{
				if($original === 'Username(lowercase letters and/or numbers)*')
					$translated = 'Username(use letters & numbers)*';
					
				else if($original === 'Create Profile')
					$translated = 'Signup to Get Free Filings';
			}
		return $translated; // Return final translation.
	}
<code>	

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Thursday Mar 7th, 2013 at 1:19 pm #43968
Eduan
Username: Eduan
Moderator

Hello Ganaxi,

It seems the code you posted got all messed up by PHP, can I assume that the original was the following?:

Posted: Thursday Mar 7th, 2013 at 1:31 pm #43970
Ganaxi
Username: ganaxi

yes, eduan.

Thanks for the response. Any idea on how to implement this, because it doesn’t work as is – possibly, my guess, because of the parentheses.

Posted: Friday Mar 8th, 2013 at 4:15 am #44037

I just looked up the string in the files and it doesn’t include the asterisk. Try with [hilite mono]Username (lowercase letters and/or numbers)[/hilite].

Viewing 3 replies - 1 through 3 (of 3 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.