WordPress.org

Ready to get started?Download WordPress

Forums

Search in Place
[resolved] Rename post to another language (5 posts)

  1. nezzard
    Member
    Posted 1 year ago #

    Hello, pls help. Where in code, i can change POST, PAGE to my language?

    http://wordpress.org/extend/plugins/search-in-place/

  2. codepeople
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    If you want to change the POST and PAGE words to your language, please follow the steps below:

    1. Open the searchinplace.clss.php file for edition
    2. Search for the lines of code:

    $this->javascriptVariables['post_title'] = __('Post', $this->text_domain);
    $this->javascriptVariables['page_title'] = __('Page', $this->text_domain);

    3. Translate the words: 'Post' and 'Page' to your language.

    4. Save the changes

    That's all.

  3. nezzard
    Member
    Posted 1 year ago #

    i have only

    // Fake variables to allow the translation for Poedit application
    		$a = __('post', $this->text_domain);
    		$a = __('page', $this->text_domain);
    		$a = __('attachment', $this->text_domain);
    	} // End init
  4. nezzard
    Member
    Posted 1 year ago #

    i rename on this lines

    $a = __('post', $this->text_domain);
    		$a = __('page', $this->text_domain);
    		$a = __('attachment', $this->text_domain);

    but nothing happened

  5. nezzard
    Member
    Posted 1 year ago #

    After a while I realized that these data are derived from the database, and then wrote a small code

    if ($result->post_type == 'post')
    			{
    			$result->post_type = 'Пост';
    			}
    			if ($result->post_type == 'page')
    			{
    			$result->post_type = 'Страница';
    			}

    I do not know right or wrong, but it works

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.