A
A
andrey69rus2018-06-01 09:15:38
WordPress
andrey69rus, 2018-06-01 09:15:38

How to fix wordpress custom metabox translation?

the code

// Add Sidebar Settings to pages
if ( class_exists( 'Lsvr_Post_Metabox' ) ) {
  $lsvr_townpress_page_sidebar_settings_metabox = new Lsvr_Post_Metabox(array(
    'id' => 'lsvr_townpress_page_sidebar_settings',
    'wp_args' => array(
      'title' => __( 'Sidebar Settings', 'townpress' ),
      'screen' => 'page',
      'context' => 'side',
      'priority' => 'low',
    )

in the language pack the string is translated
5b10e50fa43b5402349282.png
and in any other place it is displayed perfectly, but where it is necessary for some reason it does not work =(
SJqdVDCkX.png?i=1

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Sklyarov, 2018-06-01
@0example

Judging by the fact that you specify the name of your theme (townpress), you need to create a translation file specifically for the theme and translate this sidebar there. You can do this with the Poedit utility. 'title' => __( 'Sidebar Settings', 'townpress' ),

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question