Hello, I have a select advanced that gives as options several languages. I am using esc_html__ to translate the key and value. The translation is accesible on the .po file but I can't display it in the page, in page only shows English language.
The metabox:
array(
'id' => $prefix . 'languages',
'name' => esc_html__( 'Languages', 'yanse' ),
'type' => 'select_advanced',
'options' => array(
esc_html__( 'English', 'yanse' ) => esc_html__( 'English', 'yanse' ),
esc_html__( 'Spanish', 'yanse' ) => esc_html__( 'Spanish', 'yanse' ),
esc_html__( 'Japanese', 'yanse' ) => esc_html__( 'Japanese', 'yanse' ),
esc_html__( 'Korean', 'yanse' ) => esc_html__( 'Korean', 'yanse' ),
),
'multiple' => true,
//'required' => true,
'std' => array( 'English', 'Chinese' ),
),
This is how I display the fields.
$valueArray = rwmb_meta( 'mb_languages', array( 'multiple' => true) );
$pieces = array();
foreach ($valueArray as $item) {
$pieces [] = $item;
}
echo implode(', ', $pieces);