CE Custom Fields has 3 main parts: Fields, Taxonomies, Seller Fields. I will show you step by step how to translate each part.

Fields

  1. Create fields in back-end (Engine Settings → CE Fields → Fields). In this example, I’m gonna add 3 fields: phone number, address, and email.

Fields - 1Details (Pay attention to the Field Name cause they will be used in the next step):
fields - 1.1

Phone number

fields - 1.2

Address

fields - 1.3

Email

  1. Open the file wpml-config.xml in Theme folder.
  2. Scroll to the the part “<admin-texts>” and insert the code.

For every single field created in step 1, you will insert the code following this format:

<key name=“ce_fields”>
    <key name=“field_name”>
           <key name=“field_label” />
           <key name=“field_pholder” />
           <key name=“field_des” />
    </key>
</key>

So, with 3 field names: phone number, address, email, the code would be like:

<key name=“ce_fields”>
    <key name=“phone_number”>
           <key name=“field_label” />
           <key name=“field_pholder” />
           <key name=“field_des” />
    </key>
    <key name=“address”>
           <key name=“field_label” />
           <key name=“field_pholder” />
           <key name=“field_des” />
    </key>
    <key name=“email”>
           <key name=“field_label” />
           <key name=“field_pholder” />
           <key name=“field_des” />
    </key>
</key>
  1. Open String Translation in Dashboard and translate the above 3 fields.

4

Taxonomies

  1. Create taxonomies in back-end (Engine Settings → CE Fields → Taxonomy), like this:

taxo 1

  1. Open Translation Management.

taxo 2

  1. Open the tab Multilingual Content Setup. Then scroll down till you see Custom taxonomies. Tick Translate for the taxonomies you want to translate and hit Save.

taxo 3

  1. Open Ads, choose a taxonomy to do the translation. Taxonomy 1 is chosen, for instance:

taxo 4

  1. Create a “text 1” taxonomy.

taxo 5

  1. Click Edit the “text 1” taxonomy.

taxo 6

  1. Click on add at the Translate box.

taxo 7

  1. Add the translation for “text 1” taxonomy. Finally hit Add New taxonomy 1.

taxo 8

  1. And here is the result!

taxo 9

Seller Fields

All the steps are similar to those of Fields. The only difference lies in the mandatory value. Instead of ce_fields, you will add ce_field_seller to the code.
I have 3 seller fields: gender, city, phone number.

  1. Create seller fields in Engine Settings → CE Fields → Seller Fields.
  2. Open the file wpml-config.xml in Theme folder.
  3. Scroll to the the part “<admin-texts>” and insert this code:
<key name=“ce_field_seller”>
    <key name=“gender”>
           <key name=“field_label” />
           <key name=“field_pholder” />
           <key name=“field_des” />
    </key>
    <key name=“city”>
           <key name=“field_label” />
           <key name=“field_pholder” />
           <key name=“field_des” />
    </key>
    <key name=“phone_number”>
           <key name=“field_label” />
           <key name=“field_pholder” />
           <key name=“field_des” />
    </key>
</key>
  1. Open String Translation in Dashboard and translate seller fields.

SPECIAL REMINDER for Seller Fields

What if the field type of your Seller Fields is Checkbox, or Radio, or Dropdown?SF 1
Take the old example with 3 seller fields: gender, city, phone number.

  • Gender: I choose Dropdown as its field type.

SF 2

  • City: Field type is Checkbox.

SF 3

With a seller field that has the field type of Checkbox, Radio, or Dropdown, the code inserted is:

<key name=“ce_sf_field_name”>
    <key name=“*”>
</key>

Therefore, with gender (dropdown), city (checkbox), phone number (text), the code is modified as below:

<key name=“ce_sf_gender”>
    <key name=“*”>
</key>
<key name=“ce_sf_city”>
    <key name=“*”>
</key>
<key name=“ce_field_seller”>
    <key name=“phone_number”>
           <key name=“field_label” />
           <key name=“field_pholder” />
           <key name=“field_des” />
    </key>
</key>

I hope this tutorial is detailed enough to help you translate CE Custom Fields to multi languages in WPML. If there’s anything unclear, just shoot a comment below and I’ll be happy to help!

0 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.