Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

wordpress change language of specific text php

function translate_specific_text( $translated_text ) {
	if ( $translated_text == 'Old Text' ) {
		$translated_text = 'New Translation';
	}
	return $translated_text;
}
add_filter( 'gettext', 'translate_specific_text', 20 );
 
PREVIOUS NEXT
Tagged: #wordpress #change #language #specific #text #php
ADD COMMENT
Topic
Name
1+4 =