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

#11281

Ale
Participant

Thanks ANh.

You are right about not translating both.
Thanks for the link to rwmb_the_value.

A way I found was to use esc_html__ for each array item:

                             <?php
                                $valueArray  = rwmb_meta( 'mb_languages', array( 'multiple' => true) );
                                $pieces = array();

                                foreach ($valueArray as $item) {
                                    $pieces [] = esc_html__(  $item,  $domain = 'yanse' );

                                }
                                echo implode(', ', $pieces);
                                ?>