Navigation überspringen
Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 12:00 7:00 – 12:00 7:00 – 12:00 7:00 – 12:00 7:00 – 12:00 -
- 13:00 – 16:00 13:00 – 16:00 13:00 – 16:00 13:00 – 16:00 13:00 – 16:00 -

Unterstützt die Zeitzone: America/Sao_Paulo (GMT-03:00)

Schlagwörter: 

Dieses Thema enthält 0 Antworten, hat 1 Stimme.

Zuletzt aktualisiert von gustavG-2 Vor 1 Monat, 3 Wochen.

Assistiert von: Lucas Vidal de Andrade.

Verfasser Beiträge
September 17, 2024 unter 11:58 am #16187903

gustavG-2

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' );

3. $english_language_code = 'en';
apply_filters('wpml_translate_single_string', get_option('g_smtp_settings')['email'], 'admin_texts_g_smtp_settings', 'email', 'gital-smtp', $english_language_code);

Das Thema '[Geschlossen] Translates strings in customised plugin' ist für neue Antworten geschlossen.