Background of the issue:
I am trying to translate a string from my custom WordPress theme using WPML. The string is registered like this in the theme: . My site's default language is Lithuanian, and the language of domain for 'theme' strings is English. I have provided the Lithuanian translation for the string in WPML's String Translation. I have added debugging code to the gettext filter and confirmed that icl_translate() correctly returns the translation ('Susisiekite su mumis').
Symptoms:
On the frontend, the original English string ('Contact us') is displayed instead of the Lithuanian translation. The filter function outputs: Original Text: Contact us, Translated Text: Contact us, Translation via icl_translate: Susisiekite su mumis.
Questions:
Why is the Lithuanian translation not applied in the frontend?
Is there a specific configuration needed for WPML to apply translations correctly?
3 декабря, 2024 на 12:55 пп
Управление согласием на использование Cookie
Мы используем cookies для оптимизации нашего сайта и услуг. Ваше согласие позволяет нам обрабатывать такие данные, как поведение при просмотре. Отказ от согласия может повлиять на работу некоторых функций.
Функциональный
Всегда активен
Это необходимо для корректной работы нашего веб-сайта.
Предпочтения
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Статистика
Мы используем их для анализа статистики нашего сайта. Собранная информация полностью анонимна. Техническое хранение или доступ, используемые исключительно для анонимных статистических целей. Без повестки, добровольного согласия вашего интернет-провайдера или дополнительных записей третьих лиц информация, хранящаяся или извлекаемая для этой цели, обычно не может быть использована для вашей идентификации.
Маркетинг
Эти cookies отслеживают Ваш просмотр веб-страниц, чтобы предоставлять релевантную Вам рекламу.