Add JS function to translate static strings