Background of the issue:
I have a plugin that we developed called gital-smtp. In this plugin I have a settings page where I want the user to be able to set different values depending on what language they are in. I have created up a wpml-config.xml. The strings have come up for string translation.
Symptoms:
When I translate them, the translated value does not come out. It runs on the same value in all languages.
Questions:
Why are the translated values not displayed correctly in different languages?
Is there anything I need to adjust in wpml-config.xml to make the translations work?
Wpml-config.xml
I have tried many different ways to get the translated value:
1. $email = icl_t('admin_texts_g_smtp_settings', 'email', get_option('g_smtp_settings')['email']);
2. $email = apply_filters( 'wpml_translate_single_string', get_option('g_smtp_settings')['email'], 'admin_texts_g_smtp_settings', 'email', 'gital-smtp' );
Тема '[Закрытые] Translates strings in customised plugin' закрыта для новых ответов.
Управление согласием на использование 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 отслеживают Ваш просмотр веб-страниц, чтобы предоставлять релевантную Вам рекламу.