We'll test it. I have another problem: we have json field and WPML doesn't want translate it (other fields are fine). I attach screesnshots. What options do we have?
Probably we can remake this field if it's required... But we don't want to translate 50 fields, it's more convinient to have all field's translations in one place.
WPML skips values that are stored as raw JSON unless you tell it how to decode them.
You have two main ways forward:
As you mentioned, split the JSON in several fields OR
Keep the single JSON field and let WPML decode it
1. Go to WPML → Settings → Custom XML Configuration.
2. Paste the following (replace your_json_field with the real custom-field key):
<wpml-config>
<custom-fields>
<!-- Decode the value as JSON and make it translatable -->
<custom-field action="translate" encoding="json">your_json_field</custom-field>
</custom-fields>
<!-- Optional: list only the JSON keys you really need -->
<!--
<custom-fields-texts>
<key name="your_json_field">
<key name="title" />
<key name="description" />
</key>
</custom-fields-texts>
-->
</wpml-config>
3. Save, then make a tiny change (e.g. add a space) in the original post to trigger an update.
4. Open the translation job – the JSON keys now appear as individual strings.
I tried to add a scheme, somehow it didn't work. Could you please check it? Field name is "json".
<wpml-config>
<custom-fields>
<!-- Decode the value as JSON and make it translatable -->
<custom-field action="translate" encoding="json">json</custom-field>
</custom-fields>
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.