This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | - | 9:00 – 18:00 | 9:00 – 18:00 | 9:00 – 18:00 | 9:00 – 18:00 | 9:00 – 18:00 |
- | - | - | - | - | - | - |
Supporter timezone: America/Lima (GMT-05:00)
Tagged: Compatibility
This topic contains 15 replies, has 3 voices.
Last updated by Andreas W. 7 months, 2 weeks ago.
Assisted by: Andreas W..
Author | Posts |
---|---|
May 23, 2024 at 7:15 am #15660646 | |
babakB |
Hi! You have a fix (https://wpml.org/errata/buddypress-profile-fields-are-not-being-translated-on-the-frontend/) for translating the gender fields on the frontend for BuddyBoss. This fix doesn’t work for the options of the gender profile field in the registration form of Buddy Boss when new users sign up. What happens is that if I have a Gender field. The word Gender is translated (this is the Caption of the gender select field) but the options “Male” and “Female” do not get translated. They do get translated when visiting a profile on the frontend but not when registering. Is there a way to achieve this? With best regards, bb |
May 23, 2024 at 11:51 am #15662694 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+01:00) |
Hi, Thank you for contacting WPML support. While you are waiting for one of my colleagues to take this ticket and work on it, let me provide you with the first debugging steps and try to help with the issue quickly. Can you use the workaround from errata just add your gender field as type also, so adjust the code so it contains the next: if ($type == 'textbox' || $type == 'wp-textbox' || $type == 'wp-biography' || $type == 'gender') { Let us know how it goes. Regards, |
May 23, 2024 at 2:10 pm #15663762 | |
babakB |
I have already tried this and it doesn't work |
May 23, 2024 at 6:23 pm #15664872 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, I am not sure if I am understanding this correctly: "They do get translated when visiting a profile on the frontend but not when registering.". Do the translations not work on Frontend for newly registered users or are you trying to translate strings in the backend (wp-admin)? Best regards |
May 23, 2024 at 8:39 pm #15665193 | |
babakB |
Hi Andreas! Then options (Male / Female) in the gender field are translated on the frontend when going to the users profile. They are not translated on the front end when the user registers and account. /b |
May 23, 2024 at 8:52 pm #15665246 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, If you search on WPML > String Translation for "Male" and "Female" did you translate all the available results? The strings on the backend are likely not the same string that are used on the login form. You might also try to search for additional strings at WPML > String Translation > Translate texts in admin screens (link on the bottom of the page). You could also try to use the following method to locate the string, by enabling the option and reloading the login page. This should register all strings found on this page: If this does not solve the issue, then this might occur because the user is not registered, and there is no information saved in the browser about the user's language. WPML has an option to set a language cookie for such cases. You can find this option at WPML > Languages > Language filtering for AJAX operations. Is this option already enabled on your site? Best regards |
May 24, 2024 at 9:56 am #15666882 | |
babakB |
Hi Andreas! If you search on WPML > String Translation for "Male" and "Female" did you translate all the available results? The strings on the backend are likely not the same string that are used on the login form. === YES You might also try to search for additional strings at WPML > String Translation > Translate texts in admin screens (link on the bottom of the page). === The strings don't show up You could also try to use the following method to locate the string, by enabling the option and reloading the login page. This should register all strings found on this page: === This option is not working because the strings show up on the register an account page and that page isn't reachable when logged in. If this does not solve the issue, then this might occur because the user is not registered, and there is no information saved in the browser about the user's language. === Does it need a cookie because === This is already enabled. Is there anything else I can do? With best regards, bb |
May 24, 2024 at 5:01 pm #15668691 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
I can not confirm such an issue on my test site: Did you register the profile fields at Users > BuddyPress > SignUp? You also might see a banner on this page demanding that BuddyPress MUltilingual needs to register the fields. The names of the strings are: |
May 24, 2024 at 5:10 pm #15668693 | |
babakB |
Andreas! I'm so sorry, I wrote BuddyPress in the Topic but when I described my problem I wrote BuddyBoss. I use BuddyBoss. I've added the options here: BuddyBoss -> Profiles-> And on the Details (Signup) tab I've added a gender field. So maybe it differs? I've translated the string in the stringtranslation but it doesn't work... /b |
May 24, 2024 at 6:00 pm #15668875 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
On my test, this does not make a difference. BuddyBoss seems to be using the same strings. hidden link One-Click-Login: I would like to offer to have a closer look at the problem and request temporary access (wp-admin and FTP) to the website to investigate this issue further. You can find the required fields below the comment section when you log in to leave the next reply. The information you provide is private, which means only you and I can see and access it. IMPORTANT The private response form looks like this: Next time you reply, click "I still need assistance." Video: Please note that we are obliged to request this information individually on each ticket. We may not access any access information not specifically submitted on this ticket in the private response form. |
May 24, 2024 at 6:44 pm #15668934 | |
babakB |
Wrongly written reply by me. The credentials are sent. |
May 25, 2024 at 12:57 am #15669470 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
I see in your case the strings are coming from BuddyBoss > Profiles. Those strings are not showing up by default on String Translation. You can test this by adding different names to the fields. They will not be found on String Translation. The issue seems to be related to the "Gender" fields. I can not confirm an issue with the "Dropdown" field. I can now confirm that even on my test site the translation does now not work as expected if I use the "Gender" field: hidden link This seems to be an issue between BuddyBoss and WPML and I will need to take a closer look into the code of BuddyPress to figure out what is causing this issue. If I do not find a quick solution for the issue, I will be escalating the issue tomorrow to our compatibility team. |
May 25, 2024 at 4:20 pm #15670344 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, I have prepared a workaround for this issue, which includes codes that needs to be implemented into our BuddyPress Multilingual Add-on. Please take a backup of your site and database before taking changes! One the file wp-content\plugins\buddypress-multilingual\includes\class.xprofile.php Change line 12 to: const FIELD_TYPES_WITH_OPTIONS = [ 'radio', 'checkbox', 'selectbox', 'multiselectbox', 'gender', 'option' ]; On line 29 add: add_action( 'bp_xprofile_admin_new_field_additional_settings_gender', array( $this, 'saved_field_action' ) ); On line 43 add: add_filter( 'bp_get_the_profile_field_options_select_gender', array($this, 'translate_multiselect_option'), 0, 5 ); This will make the option values translatable with String Translation. The only side effect that I was not yet able to solve, is that it will register a new string antime you edit the option, instead of overwriting the already registered string, which means you need to manuallt clean up old strings on WPML > String Translation. I will be escalating this issue today internally so that our Developers can take care about implementing this properly into an upcoming version of BuddyPress Multilingual. Best regards |
May 25, 2024 at 6:19 pm #15670391 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
This issue has been escalated for review to our Second Tier Support Team and from there should be escalated very soon to the BuddyPress Multilingual development team. As soon I got news on this matter I will contact you again. |
June 13, 2024 at 6:55 pm #15737635 | |
babakB |
Okay thanks Andreas. Your hard code workaround is working. Please let me know when this is fixed so I don't need to worry about hardcoded stuff. 🙂 /b |