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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: America/Los_Angeles (GMT-07:00)

This topic contains 6 replies, has 2 voices.

Last updated by mikeleD 8 hours, 58 minutes ago.

Assisted by: Bobby.

Author Posts
September 25, 2024 at 2:52 pm #16221283

mikeleD

Background of the issue:
I'm trying to translate our custom plugin and theme with WPML. Because we use files other than the standard ones, like .twig files, I'm unable to use 'Themes and Plugins localization' option to scan our plugin and theme. Because of that, I've manually generated .pot files for both plugin and theme (different text-domains) that I want to import to WPML to load so that we can translate it manually. .pot files are just templates, they don't have translations, so import would just update the list of all the strings, and we would add translations for those.

Symptoms:
I can successfully import my .pot file strings and translate them, but when I update my .pot file in the code and add additional strings, I go and import the .pot file once again to the same text-domain, but no new strings are added.

Questions:
Is this a bug or is there no way to import twice (to update) to the same text-domain?

October 1, 2024 at 9:27 am #16239195

mikeleD

I have staging environment prepared, how can I send you credentials privately?

October 2, 2024 at 9:41 pm #16247569

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi there,

Can you please try to go to WPML -> String Translation and enable the option: Look for strings while pages are rendered.

Then try to access the site somewhere that text is available and go back to the String Translation screen to see if those texts will be available for translation now.

Don't forget to uncheck that option once you're done.

Documentation:
https://wpml.org/documentation/getting-started-guide/string-translation/finding-strings-that-dont-appear-on-the-string-translation-page/

Let me know your results, please.

October 3, 2024 at 6:34 am #16248003

mikeleD

Hi, that sounds like it could work, but I'm asking if there's an option for me to upload my .pot file for my theme and plugin that I'm generating automatically on each website version build. I want to automate this process, your solution requires me to turn on this option each time I add some new text on the website (as it sounds it's to slow to be turned on all the time).

October 3, 2024 at 8:07 pm #16251965

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

That is correct, leaving that option on at all times will cause performance issues on the website.

Please review this documentation as this might point you to the right direction.
https://wpml.org/documentation/support/translating-the-theme-you-created/

Let me know your results.

October 4, 2024 at 7:16 am #16252661

mikeleD

Hi, I'm translating my .pot files at the moment and I assume this will work. But this doesn't solve the problems I'm having:
- there's no option to translate my .pot files to all languages we're using on the website on the PTC website
- I have to do this outside of the whole website WP plugin area, familiarize my client with the different translation flow than what they're used to
- every new string added to .pot file requires manual work to upload the files to that website, add .po and .mo files to code and deploy
- no ability to edit these translations through WPML plugins
- can't add new languages dynamically without generating new .po and .mo files manually etc.

Is your plugin suitable for my needs?

October 4, 2024 at 7:30 am #16252686

mikeleD

My translations have just finished with the PTC and I can't seem to download the .po/.mo file that were generated. It logs me in to PTC dashboard and requires me to connect it to the Git repository which I don't want. Even if I would want that, I don't use any of the Gitlab/Bitbucket or Github, so I can't do that.