The speed of light through a medium is not invariant in the same way as the speed of light in a vacuum. In a vacuum, the speed of light is always constant and is denoted by the symbol 'c' in the theory of relativity. However, when light travels through a material medium, such as glass or water, its speed is generally slower than 'c'. The speed of light in a medium is denoted by 'v', and it is typically less than 'c'.
When light passes through a medium, it interacts with the atoms or molecules of that medium, which affects its speed. The interaction between light and the medium's particles leads to phenomena such as absorption and re-emission, causing a decrease in the speed of light compared to its speed in a vacuum.
Regarding time dilation and other relativistic effects, they still occur even when light travels through a medium. Time dilation is a consequence of the relative motion between observers and the constancy of the speed of light in all inertial reference frames. It is not dependent on the medium through which light is traveling.
In other words, time dilation occurs due to the relative velocity between observers, irrespective of whether light is traveling through a vacuum or a medium. The speed of light in a medium may affect the overall behavior of light, but it does not alter the fundamental principles of relativity, including time dilation, length contraction, and the relativistic addition of velocities.