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: Cannot find strings from the "theme options" section of my theme.

Solution: They need to be registered, you can do so by following the documentation below.

Warning: Depending on the installation, you might need to increase your max_input_vars value to a very high number (in php.ini or by asking your hosting support)

max_input_vars = XX

XX= Value in numbers. i.e: 10000

Relevant Documentation: https://wpml.org/documentation/getting-started-guide/string-translation/#admin_texts

This topic contains 4 replies, has 2 voices.

Last updated by Alejandro 11 months, 3 weeks ago.

Assigned support staff: Alejandro.

Author Posts
October 24, 2018 at 3:39 pm

jamieD

I am trying to: Translate the header 'City Map' button and search bar placeholder (SEARCH THE PORTAL)

Link to a page where the issue can be seen: All Pages (Header)

I expected to see: Can't find proper strings in WPML.

Instead, I got: Can't translate the text.

I was able to customize the button and placeholder text through the Appearance > Customize menu, where editable theme elements are located. The menus are 'Header' (Map Toggle Label) and 'Misc' (Search Input Placeholder).

October 24, 2018 at 5:14 pm #2847365

jamieD

Hi there, I'm kind of in a time crunch as my client wishes to soft launch the website tomorrow. Any chance you could set a priority for my minor issue?

Thanks!

October 24, 2018 at 5:57 pm #2847473

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

Hello,

I believe in this case, it's better if you create a generic rule that will apply to every theme setting in the Customizer (they will appear in WPML > String Translation as soon as you add the text in the Customizer setting for the first time.)

you can erase the code of the previous ticket and add this one instead:

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

if you don't want to do that, then you just need to remove the nested <key /> tag where the asterisk is in the above code and add these 2 instead:

<key name="search_input_placeholder"/>
<key name="header_map_toggle_label"/>

That will do the trick.

In the future, you can ask your hosting provider to increase your PHP max_input_variable directive or you can do it directly adding the following code in your installation's php.ini file :

max_input_vars = XX

where "XX" is the number of variables you desire.

I hope i was clear enough. If you feel this issue is resolved, then i suggest you close the ticket otherwise you can always leave an answer or open another ticket. I'll gladly help you solve your WPML related problems.

October 24, 2018 at 9:41 pm #2847923

jamieD

So awesome, Alejandro. Thank you very much! My issue is resolved. Just a quick question about the max-input-vars. What number do you recommend? And will a very high number break anything on the server side?

October 25, 2018 at 6:42 am #2848796

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

Hello,

In your specific case you'd need to set it to over 42.000. The thing here is that you need to ask your hosting if that value is possible for you because it is very high and can take more resources than allowed (but it shouldn't break anything as far as I know). Plus, in most cases it's unnecessary, it's better to just contact the support staff of the theme and let them know about this small issue, so they can fix it and make it available for the next version of the theme. They can always contact us if they need help.

I'm very glad your problem is solved. Don't hesitate to open a new ticket if you ever encounter another WPML related issue.