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.

Our wait time is higher than usual, please make sure you are meeting the minimum requirement - https://wpml.org/home/minimum-requirements before you report issues, and if you can take a look at current Known Issues - https://wpml.org/known-issues/. Thank you.
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: Europe/Madrid (GMT+02:00)

Tagged: 

This topic contains 1 reply, has 0 voices.

Last updated by Marcel 4 days, 4 hours ago.

Assisted by: Marcel.

Author Posts
April 2, 2025 at 9:51 pm #16889253

reedL

Background of the issue:
I am trying to translate my homepage which is a static .twig file on my theme, Timberland. Most other pages translate but not our homepage. I am using WPML for translations.

Symptoms:
The homepage isn't translating, while other pages do.

Questions:
How can I translate a static .twig file in my theme using WPML?

April 4, 2025 at 9:58 am #16896594

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Hi,

You can try enabling the option to scan these strings as described in this thread:
https://wpml.org/forums/topic/wpml-scan-doesnt-find-string-in-twig-template-files/

This will register the twig strings using the getText() function, if they are prepared as shown here:

{{ __('Example heading to translate', 'example-domain') }}

Best regards,
Marcel