Home › Forums › Community Forum › Translate strings in paypal pro registration
Tagged: translate
This topic contains 18 replies, has 3 voices. Last updated by Cristián Lávaque 3 years, 6 months ago.
Topic Author | Topic |
---|---|
Posted: Saturday May 25th, 2013 at 1:23 pm #50631 | |
|
|
Hi, I am trying to tranlate some strings in the paypal prof form vie the codestyling localizatian plugin. I had a look in the code, an there, these strings are translatable.
What can id dot, to translate this without touching the core files? Can i copy the template file to my folder and translate it in the Code directly? The same Problem with tthe pro sidebar widget: Currently I am not able, to translate “My Account” and “Logout”. Any help is welcome. Cheers, |
List Of Topic Replies
Author | Replies |
---|---|
Author | Replies |
Posted: Sunday May 26th, 2013 at 5:32 pm #50668 | |
|
|
You can translate it with a hack like this too: Create this dir/file: /wp-content/mu-plugins/s2hacks.php |
|
Posted: Sunday May 26th, 2013 at 9:00 pm #50685 | |
|
|
Hi Christian, just to be sure: Where it says $translated there should follow the translated words? Thanks, |
|
Posted: Sunday May 26th, 2013 at 10:21 pm #50686 | |
|
|
That’s right. |
|
Posted: Monday May 27th, 2013 at 5:03 am #50701 | |
|
|
Hi, these strings are not contained in die
variable. This is an output form the
variable: enYes, I want to receive updates via email.[%s] Username/PasswordYour Username/Password for: Username: %%%%user_login%%%% User ID: %%%%user_id%%%% If you haven’t already done so, the next step is to Register a Username. Complete your registration here: If you have any trouble, please feel free to contact us. Best Regards, %%%%item_name%%%% Your order can be retrieved here: If you have any trouble, please feel free to contact us. Best Regards, %%%%item_name%%%% Subscr. ID: %%%%subscr_id%%%% Your Username/Password will arrive shortly, in a separate email. If you have any trouble, please feel free to contact us. Best Regards, %%%%item_name%%%% Transaction ID: %%%%txn_id%%%% Your order can be retrieved here: If you have any trouble, please feel free to contact us. Best Regards, %%%%item_name%%%% Subscr. ID: %%%%subscr_id%%%% Your Username/Password will arrive shortly, in a separate email. If you have any trouble, please feel free to contact us. Best Regards, %%%%item_name%%%% Transaction ID: %%%%txn_id%%%% Your order can be retrieved here: If you have any trouble, please feel free to contact us. Best Regards, What shall I do now? Cheers, |
|
Posted: Wednesday May 29th, 2013 at 2:45 am #50789 | |
|
|
What code did you use and where was that output? |
|
Posted: Wednesday May 29th, 2013 at 8:39 am #50823 | |
|
|
I used thas filter function:
|
|
Posted: Thursday May 30th, 2013 at 1:47 am #50905 | |
|
|
I see. If you echo $original, you’ll get every s2Member domain’s string echoed, not just the one you want translated. |
|
Posted: Friday May 31st, 2013 at 5:29 am #50993 | |
|
|
Hi, nope. That’s wrong. “Log me in” isn’t there for example….there are also a lot of other strings missing in the output above. Any other suggestions? |
|
Posted: Friday May 31st, 2013 at 9:31 pm #51094 | |
|
|
It’ll show the s2Member strings that are the s2Member files that the page loaded. If the string wasn’t in that page, it won’t be shown. By the way, the string match is case sensitive and the correct string is [hilite mono]'Log Me In'[/hilite], but you have [hilite mono]'Log Me in'[/hilite]. It’s best to look for the string in the source files and once you find it, copy it and then past it in your hack to avoid any mismatches like that. |
|
Posted: Saturday Jun 1st, 2013 at 2:01 pm #51142 | |
|
|
Works now! Thank You! |
|
Posted: Sunday Jun 2nd, 2013 at 12:05 am #51153 | |
|
|
Great! Thanks for the update. :) |
|
Posted: Sunday Jun 2nd, 2013 at 10:04 pm #51201 | |
|
|
Hi Cristián, what I don´t get is this: The hack you posted above includes the way to translate a few words (account, password …) but obviously there are much more included in the pro forms. Are you saying we should look up all the strings we want to translate and then include them along the lines of “else if ($original === ‘xxxx’) $translated = ‘xxx’; Also: is there a sure way to detect text strings within php files that show to a user? Further, I don´t understand what to think and do with the long code that Cornelia Esther (lars) posted on monday 27th. Should I understand what it is all about? Thanks, |
|
Posted: Tuesday Jun 4th, 2013 at 7:21 pm #51379 | |
|
|
Right, add an [hilite mono]else if...[/hilite] for each string you want to add a translation for.
If you search the s2Member files for [hilite mono]_x([/hilite] you’ll find the strings that can be translated. http://codex.wordpress.org/Function_Reference/_x
That was the result of a failed test she did, you can ignore it. |
|
Posted: Tuesday Jun 18th, 2013 at 2:22 pm #52138 | |
|
|
Hi Christian, me again. I tried this:
But it does not work. i copied the words from the js file directly. The output form the js files is generated here: /wp-content/plugins/s2member/s2member-o.php?ws_plugin__s2member_js_w_globals=1&qcABC=1 Nothing changes in this file, or at least not the string, I want to change… Thank You, |
|
Posted: Tuesday Jun 18th, 2013 at 5:17 pm #52148 | |
|
|
Try changing the hack file to s2member-o.php. See the article I linked to earlier, the section on s2Member-only Mode, the tab on how it impacts hacks. Knowledge Base » Hacking s2Member® Via Hooks/Filters |
|
Posted: Tuesday Jun 18th, 2013 at 7:15 pm #52157 | |
|
|
Okay. I created that file in the mu-plugins folder. It works, but not for the js file. I removed the version id, to ensure, that I get a “fresh generated” file. This is a part of my plugin code:
This the generated js code:
I also tested in a browser, where I opened the site never before….the same result, so it can not be a cache problem. |
|
Posted: Wednesday Jun 19th, 2013 at 5:23 am #52174 | |
|
|
I didn’t read the part wirth “s2-o-hacks.php”. My mistake. Now I can also translate the js strings. Thanks again! |
|
Posted: Thursday Jun 20th, 2013 at 12:47 am #52264 | |
|
|
Great! Glad you sorted it out. Thanks for the update. :) |
This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.