Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
Tagged: gettext
- This topic has 11 replies, 4 voices, and was last updated 9 years, 2 months ago by
Josh Taylor.
-
AuthorPosts
-
03/17/2013 at 6:34 pm #254416
Steve Redshaw
Participantis it possible to change field titles. I am a UK user, I would prefer mobile phone to cell phone, county to state etc?
thanks…
03/19/2013 at 9:56 am #254536Steven Zahm
KeymasterHere’s a link to several posts that have examples on how to do this. I hope this helps.
03/19/2013 at 11:25 am #254542Steve Redshaw
GuestAs per usual, thank you so much for a prompt solution, a great plug-in and great support.
03/20/2013 at 4:30 pm #254665Steve Redshaw
GuestI’ve just discovered another smart way to change terminology with the plug-in Quick Localisation.
Under the Edit tab of this plugin, enter (for example), Cell Phone in the box Old, Mobile Phone in the box New and connections in the domain box (you have to enter the text you want to translate exactly as it originally appears, capital letters and all), then click Save.
This is perhaps convenient if there are several ‘translations’ you need to do or you’re not too keen on inserting php in the theme files…
04/27/2013 at 11:20 am #258032Josh Taylor
ParticipantHi Steve,
Thanks for your additional comment about the Quick Localisation plugin.
I am currently trying to change Department: to Position: although the changes don’t seem to work.
I tried putting connections in the domain box and also, the domain URL for the page on which Form appears but to no avail.
Do you have any further suggestions as to what to do here?Thanks,
Josh
04/27/2013 at 11:44 am #258033Steven Zahm
Keymaster@ Josh Taylor
Personally, I have not used the plugin, but the correct domain for Form is ‘connections_form’.
04/27/2013 at 4:28 pm #258035Josh Taylor
Participant@ Steven Zahm
I couldn’t get the plugin to work so I tried some code and popped it at the bottoms of my functions.php file but still not working. Maybe I got something in the code wrong?
function josh_gettext( $translated_text , $text , $domain ) {
if ( $domain == 'connections_form' && $translated_text == 'Department' ) {
$translated_text = 'Position';
}
return $translated_text;
}add_filter( 'gettext', 'josh_gettext', 20, 3 );
Cheers,
Josh
04/27/2013 at 8:59 pm #258042Steven Zahm
Keymaster@ Josh Taylor
That looks right. Here’s the code that I just tested and it worked for me:
function josh_gettext( $translated_text , $text , $domain ) { if ( $domain == 'connections_form' && $translated_text == 'Department' ) { $translated_text = 'Position'; } return $translated_text; } add_filter( 'gettext', 'josh_gettext', 20, 3 );
We are talking about Form, right?
04/27/2013 at 9:08 pm #258045Josh Taylor
Participant@ Steven Zahm
Yep- I had to take the <pre lang=”php”> out otherwise it breaks the functions.php file.
Yes- Form it is. I have it enclosed in a Tab plugin (Squelch) although I can’t see how that would affect it.
I even tried modding the .pot file in the Lang folder and clearing the Cache but to no avail.
Not sure what to do next.
04/27/2013 at 9:29 pm #258047Steven Zahm
Keymaster@ Josh Taylor
Not sure what to suggest. That code I pasted works for me. Make sure when you pasted it, none the characters were converted to HTML entities., for example the &&.
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.