If you are having a notice about writing the .mo files please read this doc

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 4 replies, has 2 voices.

Last updated by Diego Pereira 7 months, 4 weeks ago.

Assigned support staff: Diego Pereira.

Author Posts
March 22, 2019 at 10:03 am #3438977

sergeyS-14

Hi there!
I have dynamically added stuff for property. Check screenshot.

This is meta_value of meta_key with name 'fave_multi_units'

a:3:{i:0;a:6:{s:13:"fave_mu_title";s:7:"HOUSE 1";s:13:"fave_mu_price";s:5:"95000";s:12:"fave_mu_beds";s:1:"4";s:13:"fave_mu_baths";s:1:"3";s:12:"fave_mu_size";s:3:"140";s:20:"fave_mu_size_postfix";s:2:"m2";}i:1;a:4:{s:13:"fave_mu_title";s:7:"HOUSE 2";s:13:"fave_mu_price";s:6:"750000";s:12:"fave_mu_beds";s:1:"4";s:13:"fave_mu_baths";s:1:"3";}i:2;a:4:{s:13:"fave_mu_title";s:7:"HOUSE 3";s:13:"fave_mu_price";s:7:"850000 ";s:12:"fave_mu_beds";s:1:"4";s:13:"fave_mu_baths";s:1:"3";}}

This can contain more then one, let say some of them can be 3 another 7 other 12 etc.

Which is the best way to translate those kind of data?

I already read stuff here: https://wpml.org/documentation/support/language-configuration-files/#custom-fields

So i believe its shold be like this:

<custom-fields>
<custom-field action="translate">fave_multi_units</custom-field>
</custom-fields>

<custom-fields-texts>
<key name="fave_multi_units">
<key name="fave_mu_title" />
</key>
</custom-fields-texts>

* Is this correct? How i can check if this is correct?
* Also i wold like to know where i need to put the wpml-config.xml file if i use child theme?

Also I am worried about performance of this kind translations. More data more query etc...

May be there is a way to translate only "fave_mu_title" and save space database tables because probably we will have a lot of metadata like this...

Thank you!

March 22, 2019 at 1:01 pm #3440395

sergeyS-14

Can some one please answer?

Thank you.

March 22, 2019 at 6:16 pm #3443415

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello @sergeys-14, welcome to the WPML support Forum!

In the child-theme, you need to put the wpml-config.xml file on the root folder. You can add the custom XML code to WPML > Settings > Custom XML Configuration.

Another option is to go to WPML > Settings > Custom Fields Translation and set the fields as "Translatable".

After updating the field settings, you still need to go to the edit screen of the page (original language), do a small modification and save, in order to refresh the fields available for translation.

Please let me know if it worked for you.

All the best,
Diego

March 25, 2019 at 9:50 am #3451293

sergeyS-14

Thank you for answer about config.xml, but why you ignore most important part of main question?

Why answer only last question?

Is this not all clear what i asking for?

Can you please answer all questions?

March 25, 2019 at 7:16 pm #3457705

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there, sorry, I forgot to answer the last question.

That depends on how your theme/plugin stores the data. If it uses a separate field/option in the database, it is probably possible to translate separately using WPML.

However, if the option is stored serialized (as in the example), unfortunately it is not possible, because the data is stored this way. WPML can translate the options, but does not modify the way in which they are stored.

If you need more help or have more questions just let me know.

Kind regards,
Diego