• Resolved maddoctor

    (@maddoctor)


    I’m using a car rental theme that has some extra custom fields not seen in “regular” woocommerce products, like season prices, but woocommerce multilingual doesn’t translate those. If I make a new car listing it will copy these fields to the translations, but if I go back and edit the fields they do not carry over to the translations. So for example if I have a Summer price of 160 and go edit it to 100 it won’t update to the translations and stay at 160.

    When I disabled WPML for a test, I could see the products in the other languages having no custom field updated, so I could disable WPML, edit all the custom fields on the translations, then re-enable it, but that doesn’t look like “proper” use, there must be an easier way.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello and thank you for contacting us.
    Can you check if the custom field is set perhaps to “copy once”?
    You can see how custom fields can be translated here: https://wpml.org/documentation/getting-started-guide/translating-custom-fields/
    Because you said that the value is initially copied – it is possible that your theme has an entry in its wpml-config.xml that handles that field exactly and copies him only the first time – you should check your theme for that file and see what happens.

    It is also possible to override that functionality by going to WPML -> Settings page and click the Custom XML Configuration tab and filling there the desired behaviour of the desired element. You can read more about this here: https://wpml.org/documentation/support/language-configuration-files/overriding-language-configuration-files/

    I hope that this helps you.
    Please let me know how it goes.

    Thread Starter maddoctor

    (@maddoctor)

    Took me so long to reply here!
    There is no wpml-config.xml in the theme files.
    The main problem is I can’t find these custom fields on the WPML->Settings->custom field settings, I can find most other custom fields but not the one I want.

    Can I make it available there or it’s something only the theme developer can do?

    Hello!
    Please excuse me for the late reply.
    Yes, you can make them available (provided that they exist really) by utilizing a custom wpml-config.xml which you can place in either your theme folder as wpml-config.xml or in WPML > Settings > Custom configuration tab

    You can read more about the syntax here: https://wpml.org/documentation/support/language-configuration-files/#custom-fields and that section in particular as there is the syntax for the custom fields and what you can do with them.

    I hope that this helps you.

    Plugin Contributor Andreas Panag

    (@andrewp-2)

    Since we don’t have news for some time, I am closing this ticket.

    If you still have problem, please feel free to open a ticket in wpml.org so we can help you.

    Thank you very much

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘custom field translation’ is closed to new replies.