• Storpaddan

    (@storpaddan)


    Were in the editor can I edit the axl-tabs? I want to change, for example, “Recent Posts” and Popular posts into swedish ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • bdbrown

    (@bdbrown)

    Hi Storpaddan. You can change the text without editing the theme files. Add this function to a child theme functions.php file.

    function my_AlxTabs_titles( $translated_text, $text, $domain ) {
    	switch ( $translated_text ) {
    		case 'Recent Posts' :
    			$translated_text = __( 'PostList1', 'hueman' );
    			break;
    		case 'Popular Posts' :
    			$translated_text = __( 'PostList2', 'hueman' );
    			break;
    	}
    	return $translated_text;
    }
    add_filter( 'gettext', 'my_AlxTabs_titles', 20, 3 );

    Change “PostList1” and “PostList2” to your new text.

    Thread Starter Storpaddan

    (@storpaddan)

    Hello and thanx, I am not that comfortable with childthemes. I am more comfortable editing a .php-file. Is′t there a .php-file in which I can edit this? :O Best regards

    bdbrown

    (@bdbrown)

    OK. But any changes you make to the theme files will be overwritten the next time you update the theme. The file to edit is /functions/widgets/alx-tabs.php. Modify the $titles arguments in function _create_tabs:

    /*  Create tabs-nav
    /* ------------------------------------ */
    	private function _create_tabs($tabs,$count) {
    		// Borrowed from Jermaine Maree, thanks mate!
    		$titles = array(
    			'recent'	=> __('Recent Posts','hueman'),
    			'popular'	=> __('Popular Posts','hueman'),
    			'comments'	=> __('Recent Comments','hueman'),
    			'tags'		=> __('Tags','hueman')
    		);
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘translate axl-tabs?’ is closed to new replies.