I want to translate text in my website like google translate (Not with it). I just need a sample php code that translate some of defined words (not the whole language). here is my example code:
$text = "hello john";
$translated_text = str_replace("hello", 'Hallo', $text);
echo $translated_text;
does it execute fast on the server?
do i have to translate word by word?