Support General Show translated content Reply To: Show translated content

#11281
AleAle
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);
                                ?>