• Resolved gerd.neumann

    (@gerdneumann)


    Hi,

    I’ve setup the default delivery time to be “2-3 Werktage” in the settings:

    View post on imgur.com

    In Polylang this is translated correctly:

    View post on imgur.com

    However, when on a translated english product (default language is set to German) and when leaving the default delivery time empty on the translated product:

    View post on imgur.com

    then the German default is shown:

    View post on imgur.com

    In this case also the English default translation should be shown. Not sure why this is the case it does not work, but maybe some kind of filter is forgotten…

    Using Polylang Pro and Polylang for WooCommerce.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author vendidero

    (@vendidero)

    Hi there,

    I don’t know how PolyLang handles that but by default you may need to translate the option via String translations, e.g. translate the option “woocommerce_gzd_default_delivery_time” and choose the english slug (term) as a translation.

    Cheers

    Thread Starter gerd.neumann

    (@gerdneumann)

    I already tried this (sorry, I should have written this). There’s no string translation option for woocommerce_gzd_default_delivery_time:

    View post on imgur.com

    There’s one for all other ones, e.g. for “woocommerce_gzd_alternative_complaints_text_none” it does exist and also for many other gzd options:

    View post on imgur.com

    That’s why I am writing. Something must have been done different (“wrong”) for woocommerce_gzd_default_delivery_time, that’s maybe why it does not show up under string translations / polylang.

    Plugin Author vendidero

    (@vendidero)

    Hi,

    we are using a special filter to adjust the term in WPML, that’s why the string is not being added to the wpml-config.xml. Isn’t it possible to manually add a string to the polylang string translation engine?

    Cheers

    Thread Starter gerd.neumann

    (@gerdneumann)

    we are using a special filter to adjust the term in WPML, that’s why the string is not being added to the wpml-config.xml. Isn’t it possible to manually add a string to the polylang string translation engine

    I have no idea, pinging @chouby (the polylang maintainer), he should know how this would be best approached by a plugin that tries to be wpml/polylang compatible.

    @vendidero, yes it is possible to programmatically add strings to the strings translations.

    The native way is to use pll_register_string() to register the string in the table and pll__() to get the translated string. See: https://polylang.pro/doc/function-reference/#pll_register_string

    However it’s also possible to use the WPML API. We support the filters wpml_register_single_string to register the string https://wpml.org/wpml-hook/wpml_register_single_string/ and wpml_translate_single_string to get the translated string https://wpml.org/wpml-hook/wpml_translate_single_string/

    We also support the legacy API: icl_register_string, icl_t and icl_translate.

    Plugin Author vendidero

    (@vendidero)

    Hi,

    thanks @chouby – actually I was asking whether the admin may add strings through the UI (a panel like WPML string translation interface)?

    If that is not the case we’ll need to adjust/test our compatibility solution for PolyLang so that our custom term options are better supported..

    Hi,

    Sorry for the late answer. I am not sure that I get the question. There is a strings translations panel similar to the WPML strings translations interface, but the strings can only be added programmatically, either by the mean of the API I described above or by the mean of a wpml-config.xml file. Users cant’s add a string from the interface.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Polylang: Standard-Lieferzeit (default delivery time) not translated’ is closed to new replies.