Innitially turn off device with relay, Arduino and IR remote
Add this code within void Setup() function after initializing all pinMode().

digitalWrite(8, LOW);
digitalWrite(4, LOW);
digitalWrite(5, LOW);
digitalWrite(9, LOW);
digitalWrite(10, LOW);


And within the void translate() function add a default case statement.

default:
static int v = LOW;
digitalWrite(8, v);
digitalWrite(4, v);
digitalWrite(5, v);
digitalWrite(9, v);
digitalWrite(10, v);