If you simply transfer the conductors to the new switch:
L -> C
1 -> L1
2 -> L2
then it will work as it currently does.
It is very important that you label the conductors before you remove them - if you lose track of what goes where you will be in a world of pain from which will take a lot of effort to extricate yourself.
For now I would strongly advise putting the switch back and spending a bit of time learning how lighting circuits work
before trying to fiddle with them. That will give you the comfort and confidence that you understand what's going on. Trying to do it by putting-this-wire-in-that-hole without actually
understanding why is a bad idea.
//www.diynot.com/wiki/electrics:lighting
Unfortunately the articles there are a bit lacking in drawings of loop-at-the-switch layouts, but once you know how that works in general, the 2-way drawings will make sense, even if they don't show the loop.
A few points.
1) I think it will be a real struggle, possibly an impossible one, to get that dimmer switch to fit - a deeper back-box may well be required.
2) Are you aware that if you have a dimmer there, then when you turn the lights on at the other location, they will come on at whatever brightness the dimmer is set to, and you'll have to walk over to it to adjust it if it's not right?
If you want to control the dimming from both locations you'll need a different sort of dimmer, one which comes as a master-slave pair. They are wired differently, so you'd need to pay close attention to make sure you identify which conductor is which in the cables linking the two switches.
Again, if you
understand how it all works this will not be scary. Getting a multimeter so that you can do continuity testing would be a good idea.
3) The earth conductors should be connected to the switch faceplate, not to the back-box, although a link between the two is recommended. This applies to all the switches you are replacing with metal ones.
4) The wiring looks odd for both gangs to work as 2-way, one of them has no conductors in L2:
Do they all work properly?