On this page, we have linked to the chapters that explain how to install a shifter cable. Replacing it is quite similar. The only difference is that you have to remove the old shifter cable first.
External gear mech
The assembly instructions for the shift cable with external gear mech can be found at the following link. You will also find an assembly video there.