This thread is resolved. Here is a description of the problem and solution.
Problem: If you're trying to translate custom text on your product page that is added through code snippets, like delivery time options and messages, and you're unsure how to make these texts translatable with WPML.
Solution: First, we recommend scanning the plugin where you added the custom code in WPML -> Theme and plugins localization. After scanning, you should look for the strings in WPML -> String Translation and translate them there. Here are some guides to assist you:
if ($deliveryDays == 0) {
return; // Jeśli wybrano "Nie pokazuj", nie wyświetlaj komunikatu
}
$deliveryDate = new DateTime();
$deadlineHour = 11;
// Jeśli aktualna godzina jest późniejsza niż godzina graniczna, dodajemy dodatkowy dzień do dostawy
if ($currentHour >= $deadlineHour) {
$deliveryDate->modify('+1 day');
}
for ($i = 0; $i < $deliveryDays; $i++) {
$deliveryDate->modify('+1 day');
// Jeśli to jest weekend, dodajemy dodatkowy dzień
if ($deliveryDate->format('N') >= 6) {
$i--;
}
}
Generally we do not provide support for custom coding in this forum, but, I'll advise to scan the said plugin (where you added the code) in WPML -> Theme and plugins localization. Then you should search for the strings in WPML -> String Translation and translate accordingly.