Modify translate method dynamically