mikeD-5
Tell us what you are trying to do?
I have a theme with two textdomains; I want there to be only one.
Is there any documentation that you are following?
None exists that I can find
Is there a similar example that we can see?
None exists that I can find
What is the link to your site?
n/a
Osama Mersal
Supporter
Languages:
English (English )
Arabic (العربية )
Timezone:
Africa/Cairo (GMT+02:00)
Hi,
Thanks for contacting WPML forums support. I'll be glad to help you today.
1) If your theme has two text domains, WPML will identify them both, so in order to have one, please edit your theme and use only one text-domain.
If you use a custom theme, please check our guide about making your theme translatable. (https://wpml.org/documentation/support/translating-the-theme-you-created/ )
2) Could you please share your Debug information with me?
You can read a detailed explanation about it here. (http://wpml.org/faq/provide-debug-information-faster-support )
The debug info will give me a lot of information about how your site is configured.
Best regards,
Osama
mikeD-5
Yes, I can edit the gettext calls in the theme to use a single text domain. Is that the only thing that is required? Will WPML detect that the textdomain has changed and migrate the already completed translations from the old textdomain to the new one? Or is there another step?
Osama Mersal
Supporter
Languages:
English (English )
Arabic (العربية )
Timezone:
Africa/Cairo (GMT+02:00)
Hi,
After editing the text domains, please go to WPML-> Theme and Plugin Localization and scan your theme.
Please note you might need to re-translate the strings after that, so kindly keep a backup before this step and export the translations PO file. (https://wpml.org/documentation/getting-started-guide/string-translation/#import-export-po )
Best regards,
Osama
mikeD-5
OK, so the answer then is "No, there is no way to consolidate textdomains without re-entering all already completed translations."
This seems like a weakness of the system to me, but it is what it is I guess.
Osama Mersal
Supporter
Languages:
English (English )
Arabic (العربية )
Timezone:
Africa/Cairo (GMT+02:00)
Hi,
Thanks for your reply. You can export the completed translations before the change and import them to the new text domain.
When WPML scans the theme after the change, it will see new strings in the text domain X, not old strings from text domain Y converted to X.
The best way to make this change is to try it on a staging site first to know the outcome before applying it to your live site.
I hope this helps you. If you need further info, please let me know.
Best regards,
Osama