• I have a very simple meta-box on post page in admin
    "title" => __('Top Image Position', 'themename')

    that code above is a part of an array and I can’t translate it.

    I translated Title of the whole box , but title of the field not changing.

    I am staring at the code and do not see the problem.

    Could anyone give me a hand here.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter axelya

    (@axelya)

    Eventually I managed to translate by adding __() to another line, which outputs html for meta-box

    echo ‘<label for=”‘.$meta_box[‘name’].'”>’.__($meta_box[‘title’], ‘themename’).'</label>’;

    This works just fine, but seems not right.

    Searched the forums, rewrote entire meta-boxes file – nothing works, just the hack above.

    Does anyone have ideas ?

    Thread Starter axelya

    (@axelya)

    Solution found :

    array should be wrapped in function at the end of which

    return apply_filters(‘my_function’, $bloody_array);

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can't translate meta_box content’ is closed to new replies.