rotary encoder with mp3 lilypad

Hey everyone! So I am working on this project which is using rotary encoder soldered onto mp3 lilypad board. My problem is I bought the RG one and I am not sure if it will still work.. It seems it does not really fit on the board since there's space for 5 pins (which RGB rotary encoder has) whereas the RG one has only 4.

HELP thank you

Can you compare the two pin-outs to see how similar they are? Maybe you can mount it on stripboard and solder wires between that and LilyPad?

I've seen RGB rotary encoders with 3 pins one side, 5 the other, I think the LEDs are all on the 5 pin side as RG ones have 3 + 4 pins. With luck the pinouts are similar for the AB and switch...