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.

This thread is resolved. Here is a description of the problem and solution.

Problem:
Change comment language.

Solution:
Comments language meta are stored in icl_translations table.
Search for the post_type comment with the language code which needs to be changed. Update the language_code column with the new code.

For the user, the below query resolved the issue

UPDATE `wp_icl_translations` SET `language_code` = 'az' WHERE `wp_icl_translations`.`language_code` = 'tr' AND element_type = 'comment'

This topic contains 12 replies, has 2 voices.

Last updated by Elgun Karimov 3 weeks, 1 day ago.

Assigned support staff: Raja Mohammed.

Author Posts
September 20, 2019 at 11:34 am #4611751

Elgun Karimov

I am trying to: I have bought WPML long time before but it never solved my issue. I have website hidden link and its default lang is Azerbaijani. I have tons of pages and posts there. The problem is if I ımport is from polylang I cannot choose Azerbaijani as default lang in the setup. it is like I have to set it later

Link to a page where the issue can be seen: it is wpml set up face when you choose default.

I expected to see: I want to be able to choose Az as a default language from the first set up.

Instead, I got: So please tell me whether I can choose it as a default when setting up or not.

September 20, 2019 at 1:44 pm #4612793

Elgun Karimov

I solved it one way but there is another issue.

1. in the beginning I chose Turkish as there was no Azerbaijani as default one. and then I added Azerbaijani and made it default.

2. I migrated all and finished all.

3. Now all shows fine except comments. I have 12000 comments and they all show under Turkish even though I chnaged default to Az. Menus was the same but I updated it. There were some russians as well and fixed them

4. Wondering who it did not sync it? what should I do? that is so bad for my seo

5. Please let me know how to solve it.

September 23, 2019 at 6:43 am #4620719

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello there,

I will help you with your issue.

I need some more information about the issue.

1) All those 12000 comments does it belong to a single language or is it the total count of comments including translation?

2) You have mentioned they all show in Turkish, Does is display the comments from Azerbaijan language?

Try the following steps
Goto WPML > Support > Troubleshooting, Click on the following.
- Clear cache with WPML
- set language information
- Recreate ST DB cache

If you are still stuck then this might need to be checked from the database, In that case, Please share temporary access to your site I have enabled private fields for that purpose.

Kind regards
Raja

September 23, 2019 at 8:21 am #4621543

Elgun Karimov

Hello Raja,

Thanks for responding. I tried your instructions and it still did not work.

1. all comments belong to Azerbaijani

2. Here is what happened. When I was setting WPML, I had to choose Turkish as a default language even though my site was not in Turkish. Azerbaijani was not in the list to choose as a default one. So then once I configured WPML, I changed default lang to Azerbaijani. then I migrated all. and all worked fine except comments stayed in the Turkish language. My purpose simple to use Turkish to transit to Azerbaijani. But all comments belong to Azerbaijani anyway. But now none of them shows up, becuase I have no posts in Turkish but all comments are under Turkish.

if you need cpanel access, please let me know

September 23, 2019 at 2:08 pm #4624865

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thanks for the reply,

It seems the private fields are not enabled for you already, Sorry about that, I have removed the admin credentials form your previous reply to protect your privacy and for security purpose.

Please reset the password and send the details in the next reply which I am marking as private.

Please note as for the security policy and I am restraining from using the admin credential until it is reset.

If you don't see the form below, please don't add your credentials as they will be publicly exposed: hidden link

Privacy and Security when Providing Debug Information for Support: https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

September 24, 2019 at 6:24 am #4628277

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thanks for the access,

I am not sure how you migrated the post from Turkish to Azerbaijan, WPML stores the language of the comments in icl_tanslations table, I can see there are around 12558
records for comments in Turkish languages.

The solution we have now is. From the database, goto wp_icl_transaltion table search for the element_type "comment" and language_code "tr" and update it with "az" language code for Azerbaijan.

Let me know if you can handle this by yourself, In case if you need assistance please make sure you have secured a backup of your site and provide me access to your database, I have enabled private fields again for this purpose.

September 24, 2019 at 2:12 pm #4632377

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Sure, I can help you please share access to your PHPMyAdmin, Make sure to secure a backup of your database before I can proceed. I tried with database plugins from WordPress dashboard but I am unable to execute heavy queries which end up in blank screens, So it's better to get direct access to the database.

I am unable to access your site Cpanel with the credentials provided in your previous reply. Please edit your previous reply and update the working credential for your Cpanel. I have enabled private fields for you if you prefer to share it again.

If you don't see the private forms below, please don't add your credentials as they will be publicly exposed: hidden link

Privacy and Security when Providing Debug Information for Support: https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

September 24, 2019 at 2:53 pm #4632543

Elgun Karimov

seems not private

September 24, 2019 at 2:57 pm #4632581

Elgun Karimov

ıt does not seem you have enabled it.

September 24, 2019 at 2:59 pm #4632633

Elgun Karimov

I have edited above private link and added the into there. please use that one.

September 25, 2019 at 7:07 am #4636153

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thanks for the issue, Apologize for not enabling the private fields.

I have fixed the issue by executing the below query in your database

UPDATE `wp_icl_translations` SET `language_code` = 'az' WHERE `wp_icl_translations`.`language_code` = 'tr' AND element_type = 'comment'

For safety and security reasons I have created a backup of your database as well.

I hope this fixes your issue.

Kind regards
Raja

September 25, 2019 at 7:44 am #4636415

Elgun Karimov

Thanks so much. All done and works.

September 25, 2019 at 7:45 am #4636417

Elgun Karimov

My issue is resolved now. Thank you!