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
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -
- 19:00 – 22:00 19:00 – 22:00 19:00 – 22:00 19:00 – 22:00 19:00 – 22:00 -

Supporter timezone: Asia/Kathmandu (GMT+05:45)

This topic contains 1 reply, has 2 voices.

Last updated by Subash Chandra Poudel 1 year, 7 months ago.

Assisted by: Subash Chandra Poudel.

Author Posts
July 6, 2023 at 8:50 am #13956637

ghledisC

Tell us what you are trying to do?
I have a test page where I test various things I am creating. It is a page by post type and it is published in all languages I have. I have custom code on it to generate a template with pieces of text that are translated in string translations. But when I switch languages, the flag in the language switcher doesn't change and the translations are not displayed, only the source language.

The ICL_LANGUAGE_CODE constant is giving the correct language code.

Is there any documentation that you are following? No

Is there a similar example that we can see?
No
What is the link to your site?
hidden link

20230706104731_screenshot.jpg
July 6, 2023 at 3:37 pm #13961811

Subash Chandra Poudel

Hi there,

For more context on the issue can you please let me know the following details:

- You said "and it is published in all languages" , what do you mean when you say published in all languages? Did you translated the page in all languages? If yes, how did you translated it?

- You said "I have custom code on it to generate a template with pieces of text that are translated in string translations." Is the page a static page built completely with static texts from a page template in theme file and you translated all strings in the file from String trnaslation?

- Will it be possible to share your page template code here?

- Where can I see the page with the issue? Will it be possible for you to share the URL here?

Regards,
Subash

The topic ‘[Closed] I am unable to get translated strings on a translated page.’ is closed to new replies.