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
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.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.