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 topic contains 10 replies, has 2 voices.

Last updated by Andreas W. 4 months, 1 week ago.

Assigned support staff: Andreas W..

Author Posts
June 6, 2019 at 12:13 pm #3969097

soterisC

I am trying to:Use String Translation to translate some keyword

Link to a page where the issue can be seen:hidden link

I expected to see: In some cases it translates in some others it doesnt translate.
Example from the page i put in ticket. The Car Type is translated but the Numer of doors is not translated.

June 6, 2019 at 7:01 pm #3971679

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Thank you for contacting the WPML Support Forum.

First, change the value of "maxInputVars" inside of your php.ini file. You are currently using a value of 1000. I would recommend you to change this setting to at least 3000 or higher.
You can find the php.ini file on your server inside the folder for your currently used PHP version 7.1.7.

In case of any doubt please contact your hosting provides and ask for assistance.It might be that the string is referring to another section of the website.

Now, could you please go to WPML -> Theme and Plugin localization and scan the theme again for new strings.

Then go to String Translation and verify if there are multiple strings for the same text.

If not, try to locate the string at the option "translate texts in admin screens" at the bottom of the String Translation screen. You will need to search for theme domains and locate the string manually.
Once you found it mark the checkbox and scroll to the bottom of the page to apply the changes.

In case you can not locate any addtional strings and the translation still does not work you might try to apply a custom XML config at WPML -> Settings.
More information here: https://wpml.org/documentation/support/language-configuration-files/#admin-texts

In case everzthing fails, we might check the theme on a new installation of WordPress. Please install the theme here, recreate the issue and let me know if thew translation worked:

One Click Login: hidden link

Kind regards
Andreas

June 7, 2019 at 8:35 am #3974805

soterisC

Thank you Andrea for your reply.

I have changed the php.ini and search again. i didnt locate any additional strings.
I search manually for these keywords in "translate texts in admin screens" but i couldnt find any additional strings under the theme (BookYourTravel) and under car_rental

About the XML i didnt quite understand how to do it.

I have found from wp_options that Number of doors is number_of_doors so go to Custom XML Configuration and i wrote

<admin-texts>
    <key name="number_of_doors"/>
</admin-texts>

but when i click save it displays:

The XML is not valid:
Element 'admin-texts': No matching global declaration available for the validation root.

June 7, 2019 at 5:23 pm #3978171

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Please warp the custom xml as followed:

<wpml-config>
<admin-texts>
    <key name="number_of_doors"/>
</admin-texts>
</wpml-config>

In case the string will still not appear on string translation this might be a theme issue, as the string was properly not wrapped correctly with a GetText Call. The theme authors will need to solve this issue in this case or you could locate the string in its template file and edit it manually.

Here the respective documentation on order to make strings appear for translation:

https://wpml.org/faq/language-setup/

Take note, that once the theme recieves an update the template might get overwritten, which for I would advise to reach out to the theme author's in regards to this issue.

Our compatibility team will support you here, but first please let me know if the custom xml config did the job. Add it to WPML -> Settings and verify if the string appears on String Translation.
If not, install the theme to the following test site and let me know when it is ready.

One Click Login: hidden link

Kind regards
Andreas

June 10, 2019 at 5:32 am #3985243

soterisC

Thanks Andrea for the reply.
I have tried this and still no additional keyword is displayed.
I think the problem is not that they keyword is not displayed.
The keyword is displayed in the String Translation but for some reason is not translated.. some other keywords are translated succesfully.
Is it possible to give admin access to the site in order to check it better? maybe i miss something

Best Regards,
Soteris

June 10, 2019 at 5:44 pm #3989283

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to a testing site where the issue is replicated.

You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.

IMPORTANT

Please make a backup of site files and database before providing us access.
If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:
hidden link

Kind regards
Andreas

June 11, 2019 at 5:48 pm #3997821

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Please got to WPML -> Translation Management and complete the setup wizard.

Then go to WPML -> Settings -> how to translate posts and pages and activate one of the WPML Translation Editors.

https://wpml.org/documentation/translating-your-contents/using-the-translation-editor/
https://wpml.org/documentation/translating-your-contents/advanced-translation-editor/

Then go to Car Rentals -> MERCEDES C CLASS W204 and translate agin using the WPML Translation Editor.

I hope this will solve the issue. Let me know if it worked out.

Kind regards
Andreas

June 12, 2019 at 6:51 am #4000737

soterisC

Thank you Andreas for your reply.
I have tried what you suggest and when i click edit with WPML editor is just empty.
Please see images for convenience.

If i send a document for translation it stuck to:
Sending batch Itour|WPML|en|2 to translation.
Rollback jobs...

Batch rolled back

See image 5

June 12, 2019 at 7:00 pm #4007229

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

I have inspected your site and the debug.log inside of your wp-content folder shows various database errros.

Could you please basically recreate the issue on the following test site by adding the BookOurTravel Theme in its original version and creating some custom post types based on the theme.

One Click Login: hidden link

I will then further investigate if we are handling with a compatiblity issue.

Leave me a short notification once the theme is installed and ready.

Kind regards
Andreas

June 13, 2019 at 1:56 pm #4013455

soterisC

Is there any other way to find solution for this problem?
It will take me a lot of time to install the theme and create the specific car listings
You can not directly check in the site?

I have the same error with the same template to other domain
(hidden link)

Regards,
Soteris

June 13, 2019 at 3:19 pm #4014365

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

It is very likely that there is a compatiblity issue bettwen the theme and our plugin. In order to investigate and escalate the issue to our compatibility team I will need to recreate the problem on a new WordPress installation.

It would be verz helpful, if you could simply install the Theme on the sandbox test site and if possible give me some detailed steps for recreating the issue.

Further, please leave the provided access to your site active. It will help me to recreate the issue.

Leave me short notification once the theme is installed. Make sure to install the orgignal BookYourTravel Theme and you might add the child theme, but it is not mandatory.

Kind regards
Andreas

The topic ‘[Closed] String Translation is not working in some cases’ is closed to new replies.