-
Author
-
July 12, 2013 at 09:42 #537GEORGEPAPANASTASIOUParticipant
I use wpml program to translate the site. I like when i have the signs on top with the languages. I start to tranlate all the pages i have or you created. BUT how i translate the profile fields in my language (greek) without lost the english version because maybe somepeople likes to work in english and not in greek. And in the admin page of sweetdate i want to have and both version. What you recommend to me to do..
Thank’s a lot for your attention!July 12, 2013 at 12:08 #545SQadminKeymasterHi,
You can set the style for the language switcher to be a dropwdown from WPML. I guess it looks nicer.
You should let the defined profile fields in english and then translate them using WPML string translation.In admin you can select your language form your Profile
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionJuly 12, 2013 at 12:29 #547SQadminKeymasterMaybe this plugin can help you also :
http://wordpress.org/plugins/buddypress-multilingual/Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionJuly 12, 2013 at 19:20 #565rugwarriorParticipantHi there,
BuddyPress Multilingual is currently under heavy development (as told me from WPML). There will be a new version supporting BuddyPress 1.7+ but they could not tell me how long it will take but they are working on this since a while… so I hope it will be this month 🙂
And they also completely rewrite the WooCommerce plugin to make the whole process a lot easier (this is already in beta test)…
July 12, 2013 at 23:51 #576GEORGEPAPANASTASIOUParticipantHi!
I using WPML string translation BUT i can’t find the words Man, Woman…. i see with mozila source explorer that they are must be in one file with the name program and the WPML don’t work with this. With many other words the translation works as i expect.
I have try to change from the Admin bat the language to greek in the profile fields but the group and the others don’t change, remain the same…
Thanks for your attention…July 15, 2013 at 10:48 #621SQadminKeymasterThose fields come from the database and since they are added as english I have tried to add the generated string into a translation function. That means that you will have to translate all fields that are added as option to the fields.
I have added this in v.14 which is coming today those
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionJuly 16, 2013 at 07:50 #655SQadminKeymasterYou can try with the new v1.4 and see if those profile fields appear in WPML strings
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionSeptember 6, 2013 at 07:06 #2372sv1audParticipantHi there
I also have an issue with Buddypress profile fields label translations, when I add new fields.
I tried many tricks including WPML and Buddypress Multilingual plugin but nothing works so far.
Would it be a solution to use a (not used) profile field coming from the database and rename it ? Or please can you explain how to add new profile fields in the Sweetdate tables.
Thanks for your support.
September 6, 2013 at 16:33 #2393SQadminKeymasterHi,
What we tested and worked are the labels in the search form. We did this using WMPL string translation. You should add you fields in english to from admin and they should appear in the WPML string translation.
Other generated labels from profile area depend on how buddypress generates them.We will do some tests also with Buddypress Multilingual.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionSeptember 6, 2013 at 21:47 #2401sv1audParticipantHi,
I did several tests with WPML but it didn’t work : I created new profile fields from WP admin, but they don’t appear in WPML string translation…
Same pb for the “text before form”, I don’t see it in the string translation…
Any idea how I could make it work ?
Replace existing Profile fields instead of creating new ones ?Thanks.
September 10, 2013 at 22:59 #2621SQadminKeymasterHi,
By default Buddypress doesn’t wrap the field name in a translation function so this will do the trick so your field names would appear under WMPL string translation:
Add this code to your sweetdate-child/functions.php file and make sure to have the sweetdate-child theme active:COPY CODEadd_filter('bp_get_the_profile_field_name', 'kleo_translated_profile_name'); function kleo_translated_profile_name($name) { return __($name,'buddypress'); }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionSeptember 11, 2013 at 21:18 #2666sv1audParticipantHi,
Unfortunately it still doesn’t work for me.– I added your function to the child theme functions.php
– activated the child theme
– added a new Buddypress profile fieldBut it still doesn’t show up in the WPML string translation…
Did you manage to do the same test ?
Thanks.
September 11, 2013 at 22:20 #2669sv1audParticipantHi again,
I guess I understood why it didn’t work for me.
You need to check the WPML option “Auto Register strings” in the String Translation menu…
I still have a few bugs to solve. For ex. a select field displayed on the home page (search form) will display the right translated select menu values, whereas the user profile page won’t…
September 11, 2013 at 22:23 #2670SQadminKeymasterHi,
Instead adding those lines of code I gave you try to do this change in Buddypress core and see if it changes something: http://wpml.org/forums/topic/translate-buddypress-profile-fields/#post-64803Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionSeptember 11, 2013 at 22:42 #2671SQadminKeymasterSo in conclusion this solution worked for us:
– WPML plugin
– WMPL String translation plugin
– From WPML -> String Translation -> Auto-register strings only when logged in as an administrator
– Make this core Buddypress change as in here: http://wpml.org/forums/topic/translate-buddypress-profile-fields/#post-64803
– Browse trough the site so the strings get registeredIf you update Buddypress you need to do the core change again.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionSeptember 11, 2013 at 22:59 #2676sv1audParticipantThanks… looks like it works !
I also added Buddypress Multingual : http://wordpress.org/plugins/buddypress-multilingual/ to allow users to edit their profile fields in the right language.
Now I guess the only remaining string I could not translate is the text “before” and “after” search form, that you can edit from the theme admin. Any idea how I could do this ?
You guys got my 4 stars for your support !
September 11, 2013 at 23:06 #2677SQadminKeymasterHi.
Please replace the contents of this file: sweetdate/custom_buddypress/kleo-bp-search.php with this: https://archived.seventhqueen.com/files/kleo-bp-search.txt4 is good, 5 would be great
Just kidding. ThanksHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionSeptember 12, 2013 at 07:22 #2687sv1audParticipantWorks perfect.
You won another star for rating 😉
September 12, 2013 at 12:39 #2709SQadminKeymasterAwesome. Thanks
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionSeptember 14, 2013 at 21:36 #2825sv1audParticipantSorry I have to re-open this post 😉
Buddypress profile field names now translates well with WPML, but field values don’t… Should I register a new core function to handle them ?
Any suggestion ?
September 15, 2013 at 22:16 #2867SQadminKeymasterI don’t think that should be translated but you can try modifying the same core file:
from:COPY CODEfunction bp_get_the_profile_field_value() { global $field; $field->data->value = bp_unserialize_profile_field( $field->data->value ); return apply_filters( 'bp_get_the_profile_field_value', $field->data->value, $field->type, $field->id ); }
to
COPY CODEfunction bp_get_the_profile_field_value() { global $field; $field->data->value = __(bp_unserialize_profile_field( $field->data->value )); return apply_filters( 'bp_get_the_profile_field_value', $field->data->value, $field->type, $field->id ); }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionSeptember 15, 2013 at 22:34 #2871sv1audParticipantThanks, we’re close…
After applying your change to Buddypress core file fields values appear translated in the theme search forms, but not in :
Register page
Edit profile pageIs this handled by Buddypress or by the theme ?
September 16, 2013 at 12:45 #2895SQadminKeymasterThat is handled by also by Buddypress. They can’t appear translated there since they need to be inserted first and then display the translated version, so original remains in the default language
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionSeptember 16, 2013 at 19:08 #2922sv1audParticipantI don’t get it. In the Edit profile page, fields are already inserted when you modify them…
Plus same fields (“Month of birth”) in my case shows translated in the Sweedate search forms, but not in the Buddypress pages…
If you have any proposal that would really help. Thanks again.
September 17, 2013 at 16:54 #2976SQadminKeymasterTough thing with translating inserted values but try modifying another core file: buddypress/bp-xprofile//bp-xprofile-classes.php at function get_value_byid()
modify return $data;
with return __($data, ‘buddypress’);Should work.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionSeptember 17, 2013 at 17:59 #2986sv1audParticipantUnfortunately that one didn’t make it…
The (select menu) field still shows in original language, and also loses index value (December switched to default January)
It’s hard to believe Buddypress doesn’t handle properly field values…!Thanks for your help, let me know if you have any other proposal please.
September 18, 2013 at 02:03 #3020SQadminKeymasterRevert the previous solution if it didn’t worked and try editing the buddypress/bp-xprofile/bp-xprofile-template.php and replace:
line 513COPY CODE$html .= apply_filters( 'bp_get_the_profile_field_options_select', '<option' . $selected . ' value="' . esc_attr( stripslashes( $options[$k]->name ) ) . '">' . esc_attr( stripslashes( __($options[$k]->name )) ) . '</option>', $options[$k], $field->id, $selected, $k );
line 552
COPY CODE$html .= apply_filters( 'bp_get_the_profile_field_options_multiselect', '<option' . $selected . ' value="' . esc_attr( stripslashes( $options[$k]->name ) ) . '">' . esc_attr( stripslashes( __($options[$k]->name )) ) . '</option>', $options[$k], $field->id, $selected, $k );
line 578
COPY CODE$html .= apply_filters( 'bp_get_the_profile_field_options_radio', '<label><input' . $selected . ' type="radio" name="field_' . $field->id . '" id="option_' . $options[$k]->id . '" value="' . esc_attr( stripslashes( $options[$k]->name ) ) . '"> ' . esc_attr( stripslashes( __($options[$k]->name )) ) . '</label>', $options[$k], $field->id, $selected, $k );
line 618
COPY CODE$html .= apply_filters( 'bp_get_the_profile_field_options_checkbox', '<label><input' . $selected . ' type="checkbox" name="field_' . $field->id . '[]" id="field_' . $options[$k]->id . '_' . $k . '" value="' . esc_attr( stripslashes( $options[$k]->name ) ) . '"> ' . esc_attr( stripslashes( __($options[$k]->name )) ) . '</label>', $options[$k], $field->id, $selected, $k );
The lines might not be the same but you’ll see something similar that gets replaced
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionOctober 28, 2013 at 13:44 #5247wttribeParticipantHello I have a similar problem.
I need to translate profile fields.
I followed all these steps:
– WPML plugin
– WMPL String translation plugin
– From WPML -> String Translation -> Auto-register strings only when logged in as an administrator
– Make this core Buddypress change as in here: http://wpml.org/forums/topic/translate-buddypress-profile-fields/#post-64803
– Browse trough the site so the strings get registeredIt does not work.
What should I do?here is what I have:
– wpml 2.9.3
– wpml string translation 1.9
– buddypress 1.8.1
– buddypress multilingual 1.4.2
everything is updated to the latest version!!please help, I dont know what to do…
October 28, 2013 at 17:41 #5282SQadminKeymasterHi,
Those should appear, at least it appeared in our tests and @sv1aud
Maybe you haven’t made the core changes to Buddypress right?Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionOctober 28, 2013 at 18:10 #5285sv1audParticipantHi
yes I finally cancelled my BP core code changes, as it didn’t work
On my side I could translate all profile fields.
Did you install the BP multilingual plugin ?October 28, 2013 at 18:28 #5286wttribeParticipantHi,
here is what I did. I opened buddypress bp-xprofile-template.php and changed from this
function bp_the_profile_field_name() {
echo bp_get_the_profile_field_name();
}function bp_get_the_profile_field_name() {
global $field;return apply_filters( ‘bp_get_the_profile_field_name’, $field->name );
}To this:
function bp_the_profile_field_name() {
echo bp_get_the_profile_field_name();
}function bp_get_the_profile_field_name() {
global $field;
$f_name = __( $field->name, ‘buddypress’ );
return apply_filters( ‘bp_get_the_profile_field_name’, $f_name );
}Nothing changed.
I have BP multilingual plugin activated.
In my wpml strings I did not find any new string…
November 18, 2013 at 22:32 #6856SQadminKeymasterHi, I checked again and worked when I applied the fix that is specified here: http://wpml.org/forums/topic/translate-buddypress-profile-fields/#post-64803
You have to :
– let WPML to handle the strings translations from WPML – Theme and plugins localization
– Auto-register strings only when logged in as an administrator from WPML – Strings TranslationThen I went to my profile, switched to my secondary language and that done it.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionNovember 20, 2013 at 01:20 #6954wttribeParticipantOk I solved the problem. I report here for the others who might find the same problem.
I updated both wpml plugin and wpml strings translation plugin (they ware out-dated)
I switched the theme to the default wp theme.
I clicked on “translate with WPML”
and it worked.
Then I turned Sweetdate child theme back and run the scan for new strings to be translated.
It worked fine.
A little bit tricky but effective so far.
Thank you for your support!
December 26, 2013 at 12:10 #8762dentwoParticipanti tried all the methods stated above and still can’t get buddy press to recognise the profile field values so that i can translate it using WPML ….
any help is appreciated
December 27, 2013 at 15:11 #8797AbeKeymasterHi,
This solution worked for us:
Install this plugins:
– WPML plugin
– WMPL String translation plugin
– Buddypress Multilingual
– From WPML -> String Translation -> Auto-register strings only when logged in as an administrator
– Make this core Buddypress change as in here: http://wpml.org/forums/topic/translate-buddypress-profile-fields/#post-64803
– Browse trough the site so the strings get registered. Try switching the site language when you are viewing your profile to the other languageIf you update Buddypress you need to do the core change again.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer. -
AuthorPosts
The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.