Custom Fields
Re-Envisioned
Support General Show translated content Reply To: Show translated content

#11267

Anh Tran
Keymaster

Hi Ale,

This is a great question!

Firstly, I think you should translate the field labels only. Translating the values makes it’s very hard to control what is saved in the database. And the data in the database should not be user’s concern, it’s for developers only.

Secondly, if you use rwmb_meta, you’ll get the field value stored in the database. It’s static and can’t be changed. That’s why you don’t see the translated text. I’d suggest using rwmb_the_value to get the option labels, which meaningful to users and translatable. See the field documentation for details.

Finally, make sure you load the text domain for the code of meta boxes.