This thread is resolved. Here is a description of the problem and solution.

Problem: client has a homepage template with some hardcoded content, and WPML doesn't recognize it as translatable

Solution: two alternatives 1. taking the content away from the template to use in WordPress so you can translate it normally.

2. making the template translatable with GetText

Relevant Documentation:

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

Last updated by hansG-10 1 year, 12 months ago.

Assigned support staff: Laura.

Author Posts
May 28, 2018 at 10:39 am #2237881



I have tried to assign a different page template to the englisch translation of the hompage for hidden link. Most of the content is in the PHP-template, but for the translation I need to have different content...Seems to not be working...

Is this possible at all?

Thanks in advance!


May 29, 2018 at 3:06 pm #2246566


Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

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


There are 2 options here:
1. you take the content away from the template to use in WordPress so you can translate it normally. This can be done but it depends on how your template/page is built.

2. you make the template translatable. To make hard-coded content translatable, you need to use Gettext function. When your content is properly coded, you can find it in the String Translation module and you can translate it from there without having to change the template.

Here is an explanation of how String Translation works:
And here WordPress documentation on internationalization:

Let me know if this helps you or if you need further assistance.

May 30, 2018 at 6:37 am #2249028


Hi Laura,

thanks for the reply. Yes, I figured option 1 out myself, too. Probably go with that, because I need the content to be different on the translate page.

Thanks again, and have a good day still...