Skip Navigation

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
- 8:00 – 15:00 8:00 – 15:00 8:00 – 15:00 8:00 – 15:00 8:00 – 15:00 -
- 16:00 – 17:00 16:00 – 17:00 16:00 – 17:00 16:00 – 17:00 16:00 – 17:00 -

Supporter timezone: Europe/Rome (GMT+02:00)

This topic contains 7 replies, has 1 voice.

Last updated by Alejandro 5 days, 5 hours ago.

Assisted by: Alejandro.

Author Posts
June 9, 2025 at 5:34 pm #17119214

jointP

Background of the issue:
I have done my whole website using custom page templates and hence I have many static strings to translate. I registered these strings via functions.php, but they are not listed in my WPML string translation section. I checked after clearing the cache. I am unable to translate these strings automatically and have to do it manually, which is difficult and time-consuming. The same issue occurs with custom menus not getting translated. I am looking for a better fix to apply changes automatically across my site. Additionally, my site is loading very slowly after using WPML.

Symptoms:
Strings registered via functions.php are not appearing in the WPML string translation section. Automatic translation is not working, and the site is loading slowly.

Questions:
How can I get the strings registered via functions.php to appear in the WPML string translation section?
Is there a way to automate the translation of static strings and custom menus?
How can I improve the site loading speed after implementing WPML?

June 10, 2025 at 5:19 am #17120125

jointP

I have attached my functions file and you can see that its registered correctly, i did scan also still not coming up in string translations,why . And how to automatically translate things in string translation page.

June 11, 2025 at 1:35 pm #17126142

Alejandro
WPML Supporter since 02/2018

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

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

Hello,

May I ask why you did it this way instead of using the WordPress standard route?
It's probably way easier to translate that way and also is scalable.

You can check how it's done here: https://developer.wordpress.org/themes/functionality/internationalization/

If most of your translations rely on that, then maybe you want to take a look at hidden link which seems like it would be better suited to keep a fully localized theme with custom templates like yours. that way with WPML you only need to worry about translating the content made inside WP and not this (and who knows, maybe it's even cheaper in both time and resources to go that route?)

Try to localize one template, and let me know how it goes, we can continue from there afterwards. If you get stuck, let me know where and I'll gladly help where I can.

Regards,

June 12, 2025 at 11:13 am #17129718

jointP

Not working i tried using <h1 class="text-lg font-semibold mb-4">

<?php echo __('FILTER & ORDER', 'junior-salon'); ?>
</h1> in my template files and its not working at all.

June 12, 2025 at 1:07 pm #17130237

Alejandro
WPML Supporter since 02/2018

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

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

1) It's better to use _e() instead of echo __() (they are very similar but work in different ways).

2) Once you do that, you will need to check the translated version of that page in the front-end

3) Then go to WPML > String Translation and search for that string.

4) You'll be able to translate it there manually or via WPML > Translation Management automatically

I wanted to wait for you to register them first before telling you what to do next but what I mentioned above is one of the ways to find that string, as mentioned here: https://wpml.org/documentation/getting-started-guide/string-translation/finding-strings-that-dont-appear-on-the-string-translation-page/#update-theme-or-plugin-translations

If you don't see it, please allow me access to the site and point me where the string is both in the back and front-end and I'll gladly check what's going on.

June 12, 2025 at 2:30 pm #17130596

Alejandro
WPML Supporter since 02/2018

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

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

This is what I did: hidden link

Your site seems to have a few issues with the database, the autoincrement might be missing in many places and you can see an error of a duplicate entry.

Make sure autoincrement is enabled on the "id" columns or primary keys of your site's tables and then let me know, please so I can enter again.

As you can see things fail at the moment and the same dupicated entry error is happening since the 10th of this month and I bet that after you fix this error, other similar ones might come up.

Can you fix those errors so I can access again and show you every step of the way here?

Regards,

June 13, 2025 at 10:22 am #17132769

jointP

please help me why i am not able to automatically tanslate . i have so many strings

image (3).png
June 13, 2025 at 10:32 am #17132863

Alejandro
WPML Supporter since 02/2018

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

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

Hello, can you please check my last reply? the problems that i showed you there didn't come from WPML at all, they came from a migration and it's likely that happened also because there wasn't enough WP memory.

Can you please fix this so I can go back and continue? in my last video i showed you the steps up until one part, but couldn't move forward because of this and what needs to be done is not just adding the autoincrement to the different tables on your entire installation or maybe remigrate from the localhost if things worked ok there and then let me know so I can access and show you the rest.