Tagged: BuddyPress User Profile Completion, wpml
Hi Han,
Thank you for using the plugin.I don’t see any reason for conflict other than an issue related to feedback message.
There is a possibility that the feedback message may not be language specific. Are you seeing this issue?Thank you
BrajeshThank you Han.
I am glad you have fixed it.The strings won’t translate as you can set them from the settings and those settings are not prepared for multilingual site(more than 1 language).
Regards
BrajeshHello Han,
I am testing BuddyPress Profile Completion and I have the same issue: the messages for the users are not translated even if WPML is activated.
I see that you fix it with PHP code snippets.
Could you share your solution?
I think it could help many people.
Best Regards
Gilles
Hi Gilles, i used the plugin ‘XYZ PHP Code” https://wordpress.org/plugins/insert-php-code-snippet/
This plugin will make shortcode of the snippets. Those shortcodes you can enter in the fields on the settings page of the ‘BuddyPress Profile Completion’ plugin.snippet made in the XYZ PHP Code’ plugin, in my case English and Dutch:
*** profile-completion-required-fields-message
<?php if ( ICL_LANGUAGE_CODE=='en' ) { echo '<a href="https://yourwebsite.com/members/' . bp_core_get_username( get_current_user_id() ) . '/profile/edit/" style="color:#32a0ff">Your text EN</a>'; } elseif ( ICL_LANGUAGE_CODE=='nl' ) { echo '<a href="https://yourwebsite.com/nl/members/' . bp_core_get_username( get_current_user_id() ) . '/profile/edit/" style="color:#32a0ff">Your text NL</a>'; }
*** profile-completion-profile-photo-message
<?php if ( ICL_LANGUAGE_CODE=='en' ) { echo "Your text EN"; } elseif ( ICL_LANGUAGE_CODE=='nl' ) { echo "Your text NL"; }
***profile-completion-cover-photo-message
<?php if ( ICL_LANGUAGE_CODE=='en' ) { echo "Your text EN"; } elseif ( ICL_LANGUAGE_CODE=='nl' ) { echo "Your text NL"; }
Hello Han,
Thanks a lot for your code, this will be very helpfull.
Best regards,
Gilles
Hello,
The php code here above permit to translate the error messages but do not keep the style of the original messages.
In my case, with only BP Profile Completion, the messages are displayed in a large box, with red colored background and white text. Excellent for a error message.But with the PHP code snippets, the error messages are displayed in grey text with no background, so we have no highlight of the message.
Is there a way to permit translation without the loss of style?
Best regards
Hello again,
A ‘simple’ WPML compatibility will be great and helpfull.
you could style the css of the error message a bit
#buddypress div#message.error p { color: #32a0ff!important; border-radius: 0; background: white!important; border-width: 1px!important; border-color: #32a0ff; font-size: 15px; font-weight: bold!important; text-align: center; border: 1px solid #32a0ff!important; }
You must be logged in to reply to this topic.